QPDF is a command-line tool and C++ library for structural PDF work: linearization, encryption, split/merge, and inspection. It does not render pages or extract text.
Overview
QPDF performs content-preserving transformations on PDF files. You can use it from the shell or link the C++ library into your own programs for programmatic PDF manipulation. Typical jobs include linearization, encryption, splitting and merging documents, creating PDFs when you supply the content, and inspecting file structure for analysis.
The tool operates at the PDF object and stream level rather than as a viewer. It does not render PDFs, extract readable text, or offer high-level page-editing APIs. Documentation is published online and ships with releases; developers integrate via pkg-config (libqpdf) or CMake (qpdf package).
QPDF relies on zlib and jpeg (libjpeg-turbo is compatible). Optional build-time crypto providers include GnuTLS, OpenSSL, and an embedded native implementation. Features such as zopfli compression can be enabled when the library is present. The project builds on Unix-like systems, macOS, and Windows with common C++ toolchains.
Packagers and integrators often use qpdf as infrastructure for pipelines that need reliable, low-level PDF rewriting without a full desktop editor.
Key features
- PDF linearization and encryption
- Split and merge PDF files
- Structural PDF inspection
- C++ libqpdf API
- Multiple crypto providers
- pkg-config and CMake integration
- Optional zopfli compression
- Command-line qpdf tool
Use cases
- Automated PDF rewriting in scripts
- Building apps that edit PDF structure
- Inspecting PDFs for analysis pipelines