qpdf
ActiveOverview
QPDF is a command-line program and C++ library that performs content-preserving transformations on PDF files, such as linearization, encryption, decryption, merging, splitting, and inspection of PDF structure.124 It is designed for developers working with PDF-producing software and users needing low-level programmatic or command-line manipulation of PDF internals, without rendering, text extraction, or conversion to other formats.24
Key Features
- Linearization - Optimizes PDFs for fast web viewing by reorganizing file structure.
- Encryption/Decryption - Adds or removes PDF encryption while preserving content.
- Merging/Splitting - Copies objects and manipulates page lists to combine or divide PDFs.
- Object Stream Handling - Converts PDFs to or from compressed object streams.
- JSON Representation - Generates unambiguous JSON of PDF structure for inspection or editing.
- PDF Creation - Builds PDFs from scratch, handling syntax, cross-references, and streams.
- Inspection - Exposes PDF internals for analysis by developers.
- Rotation - Supports rotating pages in PDF files.
Pricing
| Plan | Price | Includes |
|---|---|---|
| Community | Free | Full access to all features via source or binaries. |
Platforms & Requirements
QPDF runs on Linux, macOS, and Windows as a command-line tool and C++ library; requires a C++17-compliant compiler for building.2 Binaries available via package managers like Chocolatey on Windows, AppImage on Linux, and Homebrew on macOS; no mobile or web support.
Integrations & Ecosystem
- C++ library for programmatic use
- pkg-config (libqpdf)
- CMake integration
- JSON import/export for PDF structure
- Object copying between PDFs
- GitHub source repository
- ReadTheDocs manual
- Package managers (Chocolatey, AppImage)
Alternatives
| App | Difference |
|---|---|
| Poppler | Focuses on PDF rendering and utilities like pdftotext, unlike qpdf's structural transformations. |
| MuPDF | Emphasizes lightweight rendering and conversion, not low-level structure manipulation. |
| pdftk | Provides simpler command-line PDF operations but lacks qpdf's library and advanced features like JSON. |
| Ghostscript | Full PostScript/PDF interpreter for rendering and conversion, heavier than qpdf's lightweight approach. |
Reputation
QPDF is regarded as a reliable, lightweight tool for precise PDF structure manipulation, praised by developers for its content-preserving transformations and library utility.123 It has been actively maintained since 2001 with regular releases up to version 12.3.2, hosted on GitHub and SourceForge.27 Criticisms include its command-line nature limiting accessibility for non-technical users and lack of high-level page content interfaces or rendering.2
Sources (8)
- https://en.wikipedia.org/wiki/QPDF
- https://github.com/qpdf/qpdf
- https://sourceforge.net/projects/qpdf/
- https://qpdf.readthedocs.io/en/stable/overview.html
- https://appimage.github.io/qpdf/
- https://qpdf.readthedocs.io/en/11.5/library.html
- https://community.chocolatey.org/packages/qpdf
- https://www.ibm.com/docs/en/xl-c-and-cpp-linux/16.1.1?topic=feedback-recompiling-linking-qpdf2