qpdf Command-line tool and C++ library for PDF structure transformations and inspection.
Overview qpdf is a command-line program and C++ library for transforming the structure of PDF files. It supports tasks such as page assembly, encryption changes and web-oriented file organization, while leaving document content generation to the caller. It is useful in document-processing pipelines rather than as an interactive PDF reader or a page-rendering engine.[1] [3]
Contents Structural processing The library can copy objects between documents and construct a new PDF's structural representation. The caller still supplies page content. This division suits a pipeline that already has valid PDF inputs and needs to assemble or reorganize them; it is not a layout system for producing an invoice or report from ordinary business data.[1]
Page assembly and checks Page selection can combine source files, but document-level features need care. Forms and outlines are inherited from the primary input rather than fully reconciled across every selected page; bookmarks to omitted pages can break. Likewise, a successful structural check does not prove every content stream is correct. These boundaries matter when a job appears to finish successfully but its interactive navigation still needs inspection.[3]
JSON as a PDF representation qpdf JSON exposes PDF objects in a form that general-purpose programs can manipulate. Including stream data is necessary for a complete representation suitable for reconstructing the document. This is low-level PDF information expressed with JSON syntax, not a semantic reading of paragraphs or tables. It does not provide text extraction or recover document structure that the original file never contained.[4]
Deployment and licensing qpdf is distributed under Apache-2.0. Its download guidance points to Linux distribution packages, native packages for other systems and project releases. Applications can integrate the C++ library, while script-driven environments can use the command-line program. Those interfaces provide different integration choices; adopting the executable does not make an existing library call compatible without adapting the surrounding program.[1] [2] [5]
Substitution considerations qpdf can substitute for MuPDF for selected structural PDF-processing tasks. MuPDF also includes rendering and conversion tools, which fall outside qpdf's stated scope. A useful comparison therefore starts with the required output: another reorganized PDF is a different task from a raster preview, an extracted text file or an interactive viewer. Linearization is another distinct requirement that should be checked explicitly.[1] [3] [6]
References What is qpdf? Structural transformation library and explicit non-rendering scope
vendor · retrieved 2026-10-07 qpdf license Apache License Version 2.0
vendor · retrieved 2026-10-07 Running qpdf Page selection limitations, --check and linearization
vendor · retrieved 2026-10-07 qpdf JSON Object representation, stream inclusion and semantic limits
vendor · retrieved 2026-10-07 Downloading qpdf Distribution packages and releases
vendor · retrieved 2026-10-07 MuPDF tools Rendering and structural command-line tools
vendor · retrieved 2026-10-07 Also included: 3 capabilities and 0 substitute relationships. Check substitutes in section 1 and capabilities in section 3.