# qpdf

Command\-line tool and C\+\+ library for PDF structure transformations and inspection\.

ID: Q547 · Revision: 594

Type: software · License: Apache\-2\.0[^license] · Status: active

Website: https://qpdf.sourceforge.io/



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\.[^overview][^cli]

## 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\.[^overview]

## 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\.[^cli]

## 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\.[^json]

## 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\.[^license][^download][^overview]

## Substitution considerations

qpdf can substitute for [MuPDF](/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\.[^overview][^mupdf][^cli]

## Capabilities and substitutions

### Structural checks — limited

A successful \-\-check indicates syntactic validity, not complete content correctness\.[^cli]

Use case: Automated PDF structure transformation · Platforms: Linux, Other supported native builds · Region: Version, build and integration requirements apply

### JSON round\-trip — limited

Complete representation requires stream data; JSON is not extracted document text\.[^json]

Use case: Automated PDF structure transformation · Platforms: Linux, Other supported native builds · Region: Version, build and integration requirements apply

### Page rendering — unsupported

The project explicitly excludes viewer and format\-conversion roles\.[^overview]

Use case: Automated PDF structure transformation · Platforms: Linux, Other supported native builds · Region: Version, build and integration requirements apply

### [Substitute for MuPDF](/mupdf) — limited

Can cover structural PDF transformations, but not MuPDF's rendering or document\-to\-image tasks\.[^overview][^mupdf]

Use case: Automated PDF structure transformation · Platforms: Linux, Other supported native builds · Region: Version, build and integration requirements apply

## References

[^overview]: [What is qpdf?](<https://qpdf.readthedocs.io/en/stable/overview.html>) — Structural transformation library and explicit non\-rendering scope (vendor; retrieved 2026-10-07T12:29:31.703Z)

[^license]: [qpdf license](<https://qpdf.readthedocs.io/en/stable/license.html>) — Apache License Version 2\.0 (vendor; retrieved 2026-10-07T12:29:31.703Z)

[^cli]: [Running qpdf](<https://qpdf.readthedocs.io/en/stable/cli.html>) — Page selection limitations, \-\-check and linearization (vendor; retrieved 2026-10-07T12:29:31.703Z)

[^json]: [qpdf JSON](<https://qpdf.readthedocs.io/en/stable/json.html>) — Object representation, stream inclusion and semantic limits (vendor; retrieved 2026-10-07T12:29:31.703Z)

[^download]: [Downloading qpdf](<https://qpdf.readthedocs.io/en/stable/download.html>) — Distribution packages and releases (vendor; retrieved 2026-10-07T12:29:31.703Z)

[^mupdf]: [MuPDF tools](<https://mupdf.readthedocs.io/en/latest/guide/what-is-mupdf.html>) — Rendering and structural command\-line tools (vendor; retrieved 2026-10-07T12:29:31.703Z)

Source revision: https://substitutefor.net/entities/Q547?revision=594
