Loading...
Loading...
PDF Editor edits and organizes PDF pages with merge, insert, reorder, exchange, and crop operations, built on ComPDF page management capabilities for fast PDF cleanup and document restructuring. It is a strong fit for requests such as “edit pdf,” “organize pdf pages,” “merge pdf,” “insert pages,” “reorder pdf pages,” “crop pdf pages,” and “rearrange pdf.” Example queries include “Merge these three PDFs into one file,” “Insert this appendix after page 8,” and “Reorder the pages and crop the white margins.”
npx skill4agent add compdfkit/compdf-skills pdf-editor-compdfenv.platformwin32darwinuname -s| Variable | [Windows] | [Mac] |
|---|---|---|
| | |
| | |
| | |
| | |
| | |
| Shell syntax | | |
= the absolute path of the directory containing this SKILL.md.{skill_root}
download.compdf.com<CLI>download.compdf.comhttps://download.compdf.com/skills/winCLI/win.ziphttps://download.compdf.com/skills/macCLI/mac.zip{skill_root}/scripts/win/mac/chmod +x {skill_root}/scripts/mac/compdf_cli<CLI> --helpDownload is performed once on first use only; no re-download is needed on subsequent runs.
<LICENSE_PATH>POST https://wms.compdf.com/api/license/skillsTrial<LICENSE_API_BODY>code=200data.license<LICENSE_PATH>code=500<CLI> --help| Option | Description | Default |
|---|---|---|
| Output file path or directory | Directory of the input file |
| Output filename | |
| Allow overwriting existing files | No |
<CLI> split <input.pdf> [options]| Option | Description | Default |
|---|---|---|
| `--mode <all | range>` | |
| Page range, e.g. | — |
all{original_filename}_page_{page_number}.pdfrange{original_filename}_pages_{start}-{end}.pdf<CLI> merge <file1.pdf> <file2.pdf> [file3.pdf ...] [options]Encrypted PDFs are skipped automatically; if fewer than 2 unencrypted files remain, the command fails.
<CLI> extract <input.pdf> --range <range> [options]| Option | Description |
|---|---|
| Required, e.g. |
<CLI> rotate <input.pdf> --pages <range> --angle <90|180|270> [options]| Option | Description |
|---|---|
| Required, page range |
| `--angle <90 | 180 |
<CLI> delete <input.pdf> --pages <range> [options]| Option | Description |
|---|---|
| Required, page range to delete |
<CLI> insert <target.pdf> --source <source.pdf> --pages <range> --at <position> [options]
<CLI> insert <target.pdf> --image <imagePath> --at <position> --width <width> --height <height> [options]| Option | Description |
|---|---|
| Source PDF (mutually exclusive with |
| Image path (mutually exclusive with |
| Page range from the source PDF; |
| Required, insert before page N (1-based) |
| Image page dimensions; |
<CLI> convert <input.pdf> --standard <format> [options]| Option | Description | Default |
|---|---|---|
| Required: | — |
| ICC profile file | |
| PDF/UA title ( | Input filename |
| PDF/UA language ( | Win: |
--languageen-USzh-CNja-JPko-KRfr-FRde-DEenzhjako<CLI> convert "report.pdf" --standard pdfa-1a --overwrite
<CLI> convert "report.pdf" --standard pdfua-1 --title "My Document" --language zh-CN --overwrite<CLI> optimize <input.pdf> [options]| Option | Description | Default |
|---|---|---|
| Enable image compression | No |
| Image quality | |
| Target image PPI | |
| Compression upper-limit PPI | Win |
| | |
| Fast Web View optimization | No |
| Page content optimization | No |
| Remove annotations | No |
| Remove bookmarks | No |
| Remove forms | No |
| Remove metadata | No |
| Remove document info | No |
| Incremental save mode | No |
--compress-images<CLI> optimize "report.pdf" --overwrite
<CLI> optimize "report.pdf" --compress-images --image-quality 55 --target-ppi 144 --overwrite<CLI> compare <old.pdf> <new.pdf> [options]| Option | Description | Default |
|---|---|---|
| Page range | All pages |
| Stroke color | |
| Stroke opacity 0-1 | |
| Fill opacity 0-1 | |
| Hide fill | No |
| | |
<CLI> watermark-text <input.pdf> --text <content> [options]<CLI> watermark-image <input.pdf> --image <image_path> [options]| Option | Description | [Win] Default | [Mac] Default |
|---|---|---|---|
| Watermark text (watermark-text only) | — | — |
| Image path (watermark-image only) | — | — |
| Page range to apply | All | All |
| Font (text only) | | |
| Font size (text only) | | |
| Text color (text only) | | |
| Opacity | | |
| Rotation angle | | |
| Scale factor | | |
| Alignment`left | center | right |
| Offset | | |
| Spacing | | |
| Foreground/background | Foreground | Foreground |
| Tiled/single | Tiled | Must be passed explicitly |
⚠️ Mac:is not enabled by default; tiled watermarks must be passed explicitly.--full-screen
<CLI> watermark-text "report.pdf" --text "CONFIDENTIAL" --overwrite
<CLI> watermark-image "report.pdf" --image "logo.png" --scale 0.5 --opacity 100 --overwrite<CLI> watermark-text "report.pdf" --text "CONFIDENTIAL" --full-screen --overwrite
<CLI> watermark-image "report.pdf" --image "logo.png" --scale 0.5 --opacity 0.3 --full-screen --overwrite<CLI> watermark-delete <input.pdf> [options][Win]removes all watermarks; [Mac] iterates and removes one by one. Selective removal is not supported.DeleteWatermarks()
| Code | Meaning | Action |
|---|---|---|
| Success | — |
| Parameter error | Check required parameters |
| File not found | Check path; wrap paths with spaces in double quotes |
| Runtime error | PDF processing failed or output directory is not writable |
| License failure | Missing → run activation; Expired → direct user tocontact sales |
| User says | Command |
|---|---|
| "Split into single pages" | |
| "Merge PDFs" | |
| "Extract pages X to Y" | |
| "Convert to PDF/A" | |
| "Compress PDF" | |
| "Compare two PDFs" | |
| "Add text watermark" | |
| "Add image watermark" | |
| "Remove watermark" | |
| "Rotate pages" | |
| "Delete page X" | |
| "Insert pages" | |
| "Insert image" | |
⚠️ Mac watermark commands requireto be passed explicitly (when tiling is desired).--full-screen
"N""N-M"mergewatermark-deletecompare| Issue | Resolution |
|---|---|
| Exit 4 / License error | |
| File not found | Check path; wrap paths containing spaces in double quotes |
| Page number out of range | First confirm the total page count of the PDF |
| Standard format conversion failed | Check font embedding and whether the ICC file matches the target standard |
| Optimize/compare/watermark failed | Confirm the input PDF can be opened and is not encrypted; check parameter format and output path permissions |
| External Endpoint | Purpose | Data Sent | When | User Consent |
|---|---|---|---|---|
| Download CLI binary | None (HTTP GET) | First use only, if CLI not present | User is informed before download |
| SDK license activation | Email address only | First use only, if license not present | User provides email and confirms |
license_key_windows.xmllicense_key_mac.xmlscripts/License.txt