pdftk-server
できること
このツールは、お使いのコンピューター上で PDF ファイルを直接操作するのに役立ちます。複数の PDF を1つにまとめたり、PDF を1ページずつに分割したり、ページを回転させたり、パスワードを設定したり、フォームに入力したり、破損した PDF を修復したりできます。
使う場面
- ✓複数の PDF 文書を1つのファイルにまとめたいとき。
- ✓大きな PDF を1ページずつ分割したいとき。
- ✓PDF にパスワードを設定したい、または既存のパスワードを解除したいとき。
スキルのリンク
https://github.com/github/awesome-copilot/blob/main/skills/pdftk-server/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“次の3つの PDF を1つにまとめてください: 'document1.pdf'、'document2.pdf'、'document3.pdf'。”
毎週5つの新しいスキル。1分で読めます。
仕組み
コンピューターで文字のコマンドを入力し、PDF ファイルに対して何をするかをツールに指示します。たとえば2つの PDF を結合するには、対象のファイル名と新しく作るファイル名を並べたコマンドを入力します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
PDFtk Server
PDFtk Server is a command-line tool for working with PDF documents. It can merge, split, rotate, encrypt, decrypt, watermark, stamp, fill forms, extract metadata, and manipulate PDFs in a variety of ways.
When to Use This Skill
- Merging or joining multiple PDF files into one
- Splitting or bursting a PDF into individual pages
- Rotating PDF pages
- Encrypting or decrypting PDF files
- Filling PDF form fields from FDF/XFDF data
- Applying background watermarks or foreground stamps
- Extracting PDF metadata, bookmarks, or form field information
- Repairing corrupted PDF files
- Attaching or extracting files embedded in PDFs
- Removing specific pages from a PDF
- Collating separately scanned even/odd pages
- Compressing or decompressing PDF page streams
Prerequisites
- PDFtk Server must be installed on the system
- Windows:
winget install --id PDFLabs.PDFtk.Server - macOS:
brew install pdftk-java - Linux (Debian/Ubuntu):
sudo apt-get install pdftk - Linux (Red Hat/Fedora):
sudo dnf install pdftk
- Windows:
- Access to a terminal or command prompt
- Verify installation by running
pdftk --version
Step-by-Step Workflows
Merge Multiple PDFs
pdftk file1.pdf file2.pdf cat output merged.pdf
Using handles for more control:
pdftk A=file1.pdf B=file2.pdf cat A B output merged.pdf
Split a PDF into Individual Pages
pdftk input.pdf burst
Extract Specific Pages
Extract pages 1-5 and 10-15:
pdftk input.pdf cat 1-5 10-15 output extracted.pdf
Remove Specific Pages
Remove page 13:
pdftk input.pdf cat 1-12 14-end output output.pdf
Rotate Pages
Rotate all pages 90 degrees clockwise:
pdftk input.pdf cat 1-endeast output rotated.pdf
Encrypt a PDF
Set an owner password and a user password with 128-bit encryption (default):
pdftk input.pdf output secured.pdf owner_pw mypassword user_pw userpass
Decrypt a PDF
Remove encryption using the known password:
pdftk secured.pdf input_pw mypassword output unsecured.pdf
Fill a PDF Form
Populate form fields from an FDF file and flatten to prevent further edits:
pdftk form.pdf fill_form data.fdf output filled.pdf flatten
Apply a Background Watermark
Place a single-page PDF behind every page of the input (input should have transparency):
pdftk input.pdf background watermark.pdf output watermarked.pdf
Stamp an Overlay
Place a single-page PDF on top of every page of the input:
pdftk input.pdf stamp overlay.pdf output stamped.pdf
Extract Metadata
Export bookmarks, page metrics, and document information:
pdftk input.pdf dump_data output metadata.txt
Repair a Corrupted PDF
Pass a broken PDF through pdftk to attempt automatic repair:
pdftk broken.pdf output fixed.pdf
Collate Scanned Pages
Interleave separately scanned even and odd pages:
pdftk A=even.pdf B=odd.pdf shuffle A B output collated.pdf
Troubleshooting
| Issue | Solution |
|---|---|
pdftk command not found |
Verify installation; check that pdftk is in your system PATH |
| Cannot decrypt PDF | Ensure you are providing the correct owner or user password via input_pw |
| Output file is empty or corrupt | Check input file integrity; try running pdftk input.pdf output repaired.pdf first |
| Form fields not visible after fill | Use the flatten flag to merge fields into the page content |
| Watermark not appearing | Ensure the input PDF has transparent regions; use stamp for opaque overlays |
| Permission denied errors | Check file permissions on input and output paths |
References
Bundled reference documents in the references/ folder:
- pdftk-man-page.md - Complete manual reference with all operations, options, and syntax
- pdftk-cli-examples.md - Practical command-line examples for common tasks
- download.md - Installation and download instructions for all platforms
- pdftk-server-license.md - PDFtk Server licensing information
- third-party-materials.md - Third-party library licenses
よくある質問
'pdftk-server' とは何ですか?
テキストのコマンドを使って PDF ファイルに対してさまざまな操作を行うための、コンピューターにインストールするプログラムです。
何かをインストールする必要がありますか?
はい、'PDFtk Server' をコンピューターにインストールする必要があります。インストール方法は、Windows、macOS、Linux のどれを使っているかによって異なります。
これを使って PDF の中の文字を編集できますか?
直接はできません。このツールは、PDF の整理、結合、分割、保護、フォーム入力に使うもので、既存の文字を編集するためのものではありません。
詳細
作者による元の説明
Skill for using the command-line tool pdftk (PDFtk Server) for working with PDF files. Use when asked to merge PDFs, split PDFs, rotate pages, encrypt or decrypt PDFs, fill PDF forms, apply watermarks, stamp overlays, extract metadata, burst documents into pages, repair corrupted PDFs, attach or extract files, or perform any PDF manipulation from the command line.
repo: github/awesome-copilot
人気
- GitHubのスター
- 40k
- ランキング
- #7315
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
acquire-codebase-knowledge
40kエージェントが、既存のコードプロジェクトを理解してドキュメント化できるよう支援します。新しく参加するメンバーのオンボーディングや、アーキテクチャの全体像の把握に役立ちます。
acreadiness-assess
40kエージェントが、プロジェクトのAI対応状況を評価してレポートを生成できるよう支援します。プロジェクトがAIツールをどの程度活用できる状態にあるかを把握するのに役立ちます。
acreadiness-generate-instructions
40kエージェントが、評価結果をもとにAIツール向けの指示文を作成できるよう支援します。AIがコードとどのようにやり取りするかを改善し、特定された不足点を解消するのに役立ちます。
acreadiness-policy
40kエージェントが、AIプロジェクトの評価ポリシーの策定や適用を支援できるようにします。プロジェクトの評価方法を標準化し、コンプライアンスを確保するのに役立ちます。
似ているスキル
feishu-doc
394kテキスト、画像、表を含むFeishuのクラウドドキュメントを、ドキュメントツールを使って読み、作成し、編集するようエージェントを支援します。
feishu-drive
394kボットと共有されたFeishuのクラウドフォルダ内のファイルを閲覧、整理、コメントできるようエージェントを支援します。
feishu-perm
394kFeishuのファイルにアクセスできる人を確認し、変更するようエージェントを支援します。依頼を満たす最小の権限を選びます。