Pdftk server
Skill yzp100911/skillgate-agent/xCrab/cclaw/data/workspace-main/skills/pdftk-server
skillgate-agent - AI多模型网关与智能代理框架, 支持MiniMax/DeepSeek等主流模型, 集成MCP工具调用与技能系统。skillgate-agent - AI multi-model gateway & intelligent agent framework, supporting MiniMax/DeepSeek, MCP tools & skill system。
npx -y skills add yzp100911/skillgate-agent --skill pdftk-serverAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Command-line PDF manipulation using PDFtk Server. Use for merging, splitting, encrypting, decrypting, watermarking, stamping, rotating, filling forms, extracting metadata, and repairing PDF files.
SKILL.md
2.9 KB, as published. Nobody here has run it
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.
Prerequisites
- PDFtk Server must be installed on the system:
- Linux (Debian/Ubuntu):
sudo apt-get install pdftk - macOS:
brew install pdftk-java - Windows:
winget install --id PDFLabs.PDFtk.Server
- Linux (Debian/Ubuntu):
- Verify:
pdftk --version
Key Operations
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 owner password and user password with 128-bit encryption:
pdftk input.pdf output secured.pdf owner_pw mypassword user_pw userpass
Decrypt a PDF
pdftk secured.pdf input_pw mypassword output unsecured.pdf
Fill a PDF Form
pdftk form.pdf fill_form data.fdf output filled.pdf flatten
Apply a Background Watermark
pdftk input.pdf background watermark.pdf output watermarked.pdf
Stamp an Overlay
pdftk input.pdf stamp overlay.pdf output stamped.pdf
Extract Metadata
pdftk input.pdf dump_data output metadata.txt
Repair a Corrupted PDF
pdftk broken.pdf output fixed.pdf
Collate Scanned Pages
pdftk A=even.pdf B=odd.pdf shuffle A B output collated.pdf
Common Options
| Option | Description |
|---|---|
cat | Combine pages from multiple PDFs |
burst | Split PDF into individual pages |
dump_data | Extract metadata and bookmarks |
fill_form | Fill PDF form fields |
background | Add background watermark |
stamp | Add foreground overlay |
encrypt | Encrypt with password |
flatten | Merge form fields into page content |
Troubleshooting
| Issue | Solution |
|---|---|
pdftk: command not found | Install pdftk; check PATH |
| Cannot decrypt PDF | Use correct input_pw password |
| Output file empty/corrupt | Try pdftk input.pdf output repaired.pdf first |
| Form fields not visible | Use flatten flag |
| Watermark not appearing | Ensure input PDF has transparency |