pdfcpu
$ pdfcpu Community Low Riskpdfcpu is a self-contained Go PDF processing CLI supporting PDF 1.7/2.0 validation (validate), metadata inspection (info), merging, splitting, extracting images/pages, watermarking, and JSON-driven form filling (form fill).
brew install pdfcpu Deterministic single-binary PDF validation, splitting, and merging directly in shell without heavy Python/Java PDF runtimes.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Deterministic non-interactive CLI with -pages scoping and JSON support in config inspect --json / form fill, though info outputs structured text rather than JSON.
- Non-interactive; supports
-pages,validate, and JSON config/form workflows
100% offline Go binary; validate/info are strictly read-only and transformations write to explicit output paths.
- Pure offline Go binary with explicit output paths
Single static Go binary via brew, go install, and GitHub Releases across macOS, Linux, and Windows.
- Zero-dependency static Go binary
Fast, reliable PDF structural manipulation (merge, split, trim, validate, watermark), though not an OCR/text-to-markdown extractor.
- Fast structural PDF validation, merging, splitting, and form filling
Maintained by pdfcpu/pdfcpu under Apache-2.0 license.
- Official
pdfcpu/pdfcpurepository
Good docs at pdfcpu.io/cli/cli, though single-dash Go flag style (-mode, -pages) differs from --flag conventions.
- CLI docs at pdfcpu.io/cli/cli
Security, Auth & Guardrails
None required; optional -upw/-opw PDF passwords are passed per command.
Free, Apache-2.0 open-source Go binary.
# pdfcpu Agent Rules - Run `pdfcpu info` first to check page count and encryption before extracting pages or images from large PDFs. - Use `-pages 1-5` on `extract` or `trim` so multi-hundred-page PDFs do not flood output directories.
Agent-Ready Command Recipes
Safe Read-Only Queries
pdfcpu info document.pdf
Prints PDF version, page count, dimensions, and encryption status offline.
pdfcpu validate -mode strict document.pdf
Verifies PDF structure integrity and exits non-zero if malformed.
Controlled Writes & Previews
pdfcpu merge combined.pdf part1.pdf part2.pdf
Concatenates part1.pdf and part2.pdf into combined.pdf.
Strengths for Agents
- + Zero-dependency single Go binary for PDF validation, splitting, merging, and page extraction.
- + 100% offline with clean exit codes on
validate.
Caveats & Pitfalls
- !
pdfcpu infoemits plain text rather than JSON. - ! Focused on structural PDF operations rather than full text/Markdown extraction.