CAM::PDF

Perl module (PDF 1.0–1.5) for reading and writing PDFs: extract/delete/duplicate pages, get page text/content trees, append/prepend pages from other PDFs, handle password-protected documents and permissions, list/add fonts, list/fill form fields, remove annotations, detect linearized PDFs, remove unused objects, and apply compression filters.

In practice, fails to open PDFs using cross-reference streams (`Invalid xref stream: could not decode objstream N`) — a real gap in its PDF 1.5 parsing despite the module's own stated version range, confirmed on ~18% of a 85-file real-world corpus.

Sample Results

Real output from running this tool against a sample PDF, as part of PDFog's open-source PDF tooling benchmark — pick one to see the commands and full output.