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.”
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.”
license
Proprietary. ComPDFKit SDK license obtained via online activation API.
Platform Detection (Agent must execute automatically)
Before running any CLI command, the Agent must automatically detect the platform (read env.platform: win32→Windows, darwin→Mac; or run uname -s). Do NOT ask the user about their platform.
Variable
[Windows]
[Mac]
<CLI>
{skill_root}/scripts/win/compdf_cli.exe
{skill_root}/scripts/mac/compdf_cli
<LICENSE_PATH>
{skill_root}/scripts/win/license_key_windows.xml
{skill_root}/scripts/mac/license_key_mac.xml
<LICENSE_API_BODY>
{"email":"<email>"}
{"email":"<email>"}
<ICC_SRGB>
{skill_root}/scripts/win/PDFA/sRGB2014.icc
{skill_root}/scripts/mac/PDFA/sRGB2014.icc
<ICC_FOGRA>
{skill_root}/scripts/win/PDFA/CoatedFOGRA39.icc
{skill_root}/scripts/mac/PDFA/CoatedFOGRA39.icc
Shell syntax
cmd + REM
bash + #
{skill_root} = the absolute path of the directory containing this SKILL.md.
CLI Download & Installation (Required on first use)
The CLI binary is not included in the Skill package. It is downloaded from the official ComPDFKit distribution server (download.compdf.com) operated by PDF Technologies, Inc. The Agent must complete the following steps before the first execution:
Check whether <CLI> exists → skip if it does
Inform the user that the CLI binary will be downloaded from download.compdf.com (official ComPDFKit CDN)
Download the appropriate archive for the platform:
Extract the archive to the {skill_root}/scripts/ directory (the zip already contains a win/ or mac/ prefix, so the correct directory structure is formed automatically after extraction)
[Mac] After extraction, run: chmod +x {skill_root}/scripts/mac/compdf_cli
Verify: run <CLI> --help to confirm the binary is executable
Download is performed once on first use only; no re-download is needed on subsequent runs.
License Activation (Required on first use)
Check whether <LICENSE_PATH> exists → skip if it does
Ask the user for their email address (explain: the email is sent to the official ComPDFKit license server to obtain a free trial license; no other data is transmitted)
After the user confirms, send POST https://wms.compdf.com/api/license/skillsTrial, Body: <LICENSE_API_BODY>
code=200: write the data.license XML to <LICENSE_PATH>
code=500: prompt the user to retry with a different email address
Run <CLI> --help to verify activation
Common Options
The following options apply to all commands (they are not repeated in individual command references):
Option
Description
Default
--output, -o <path>
Output file path or directory
Directory of the input file
--name <filename>
Output filename
{original_filename}_{command_name}.pdf
--overwrite
Allow overwriting existing files
No
Command Reference
split — Split PDF
<CLI> split <input.pdf> [options]
Option
Description
Default
`--mode <all
range>`
all=split into individual pages, range=split by range
--range <range>
Page range, e.g."1-3" (range mode only)
—
Output naming: all → {original_filename}_page_{page_number}.pdf; range → {original_filename}_pages_{start}-{end}.pdf
Default behavior: removes unused/empty objects and enables Flate compression. Image compression is only enabled when --compress-images or image-related parameters are explicitly passed.