qpdf

Active

Overview

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

PlanPriceIncludes
CommunityFreeFull 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

AppDifference
PopplerFocuses on PDF rendering and utilities like pdftotext, unlike qpdf's structural transformations.
MuPDFEmphasizes lightweight rendering and conversion, not low-level structure manipulation.
pdftkProvides simpler command-line PDF operations but lacks qpdf's library and advanced features like JSON.
GhostscriptFull 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)
  1. https://en.wikipedia.org/wiki/QPDF
  2. https://github.com/qpdf/qpdf
  3. https://sourceforge.net/projects/qpdf/
  4. https://qpdf.readthedocs.io/en/stable/overview.html
  5. https://appimage.github.io/qpdf/
  6. https://qpdf.readthedocs.io/en/11.5/library.html
  7. https://community.chocolatey.org/packages/qpdf
  8. https://www.ibm.com/docs/en/xl-c-and-cpp-linux/16.1.1?topic=feedback-recompiling-linking-qpdf2