Editing PDFs With qpdf
In my recent survey of tools for working with PDF files, qpdf
stood out. It not only extracts information from PDFs, but can convert a PDF to an editable form, and then reconstitute a new PDF after edits.
Do you want to remove images from a PDF? Use qpdf
to convert the PDF to json, identify and remove images with jq
, and convert from json back to PDF. Scripting alterations to PDFs is easy in this setting.
One thing qpdf
does not do is interpret PDFs. That’s a job for a tool like PDFBox
. These two tools complement one another well.