pdfcpu CLI

pdfcpu validates, merges and splits PDFs, extracts content and manages pages through a dedicated command-line interface.

  • 8,897 ★ on the repository
  • Last commit
  • Apache-2.0
CLI

Extended access

Why this level

  • Commands modify documents and can affect signatures, encryption and accessible local images.
All reasons and checks

pdfcpu/pdfcpu

Install

Manual install

Text for your agent

Use the official CLI installation guide. Start with validate, agree on operation and paths, save separate output and inspect it in a viewer.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Commands modify documents and can affect signatures, encryption and accessible local images.

This is third-party code. Review the repository files before installing.

What it does

Select an operation and input documents, from structure validation to merging PDFs. pdfcpu splits and rotates pages and extracts images, fonts and metadata. Repeat the same sequence for a file batch. Separate operations cover encryption, forms, attachments and signature integrity. The CLI works independently of Go library integration. Preserve originals and open processed files in a viewer: command success alone does not confirm rendering or page order.

Who it is for. Document-workflow operators assembling PDF batches, changing page sets and retaining originals for comparison.

Good fit when

  • Merge several PDFs in an agreed order.
  • Split a large document for separate recipients.
  • Validate a file’s structure before handoff.
  • Extract images, fonts or metadata from an owned document.

Not a fit when

  • You need a full visual layout editor.
  • Output must be treated as identical without visual comparison.
  • Document or signature-integrity rules prohibit modification.

Example request

Validate my two PDFs, propose merge order and save output separately without altering originals.

Limitations

PDF 2.0 validation is basic and still evolving. Complex or damaged files may fail even when the operation appears suitable; first establish whether a regular viewer can open them. Modifying a document can affect signatures or page order, so keep originals through final comparison. Local images used for creation and form filling are restricted to an allowed root directory configured for that operation.

How to disable. Stop batch processing and preserve originals separately from results. Uninstalling pdfcpu does not undo document changes.

FAQ

How do I begin validation?

`pdfcpu validate input.pdf` reports structural validation and discovered issues.

What does merging do?

`pdfcpu merge merged.pdf in1.pdf in2.pdf` creates merged.pdf from in1.pdf and in2.pdf in that order. Use a separate output name.

Must I write Go code?

No. The standalone CLI performs operations without library integration.

Is PDF 2.0 fully validated?

No. Basic support does not cover every standard feature.

Why can a form command not read an image?

The image may be outside the allowed root. Set `localImageRoot` in config.yml, then retry with an image inside that directory.

Discussion

No questions or reviews yet.

CLI tools
Official

MCP PDF from ComPDF: the agent converts PDFs and images to Word, Excel, Markdown and JSON and merges, splits, protects and compares files via a cloud API

MCP serverBroad access98Repository stars

MCP PDF for large documents: the agent searches by meaning and keyword across one file or a folder and reads only the pages, tables and scans it needs

MCP serverExtended access166Repository stars

Docling is a CLI for mixed document archives, bringing PDFs, office files and spreadsheets into a shared format for AI search.

CLIExtended access70.2KRepository stars
Official

Translates scientific PDFs while keeping formulas, tables and layout intact, as a CLI, Docker image and MCP server for agents

MCP serverExtended access38.2KRepository stars

MinerU is a CLI with a document library: search and revisit an already parsed report using its local cache.

CLIExtended access83.2KRepository stars

PyPDFForm CLI saves a filled form as a separate PDF, with fields left editable or marked read-only for later viewing.

CLIExtended access1.2KRepository stars

README in short

If pdfcpu fails to process a file, `pdfcpu validate -vv <file.pdf>` produces detailed diagnostics. Remove confidential document details before sharing that log with others.

README badge

Report a problem

Foxx AIpdfcpu
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.