Skip to content

qpdf

Open-source command-line tool for encrypting, decrypting, and manipulating PDFs.

Self-hostedNot yet verified
Report issueDemo online
Apache-2.0★ 5314

Open the official app on qpdf.sourceforge.io

This tool is hosted by its maintainers. Click below to open qpdf.sourceforge.io in a new tab — it's their official demo.

Browse pdf & tools tools →

What's next with qpdf?

Choose how you want to get started.

Use it free

Open the official tool or demo — no account needed.

Free

Self-host it

Run the open-source version on your own infrastructure.

Open

What is qpdf?

qpdf is an open-source command-line tool and C++ library designed to perform content-preserving transformations on PDF documents. It enables users to manipulate PDF files while maintaining their original structure and data integrity. Developers, IT professionals, and document managers use qpdf to address challenges such as optimizing PDFs for web delivery, securing sensitive content, and streamlining document workflows. The tool solves problems like reducing file size through linearization, encrypting documents, and merging/splitting files without compromising data accuracy. Its focus on low-level PDF manipulation makes it a critical utility for developers requiring precise control over PDF metadata and structure.

How it works

qpdf is a command-line utility and C++ library that transforms PDF files while preserving their content. It is designed for developers and system administrators who need to modify PDFs without altering their visual or structural integrity. The tool addresses common PDF management tasks such as encryption, compression, and file segmentation. Its core strength lies in maintaining the original document’s content, ensuring that transformations do not introduce errors or data loss. qpdf supports linearization for faster web delivery, encryption with AES-128 or RC4, and splitting/merging of PDF files. It can also create new PDFs by assembling user-supplied content, though it does not generate content itself. Features like embedded file extraction and PDF inspection tools allow detailed analysis of document structure.

How to use it

  1. 1Install qpdf via package managers (e.g., apt, brew) or build from source using CMake. 2. Use the command-line interface to specify input/output files and transformation options, such as 'qpdf --linearize input.pdf output.pdf'. 3. Apply advanced settings like encryption with 'qpdf --encrypt user_pw owner_pw input.pdf output.pdf'. 4. Validate results using the 'qpdf --show' command to inspect internal structures. Practical tips include consulting the documentation for detailed options, leveraging shell scripting for batch processing, and ensuring dependencies like zlib are installed for full functionality.

What it can do

  • pdf tool

Use cases

Assumptions and limitations

Assumptions

  • source: https://github.com/qpdf/qpdf
  • license: Apache-2.0 — free to use
  • privacy: Self-hosted — you control your data

Limitations

  • Does not support text extraction or rendering
  • Requires manual content creation for new PDFs
  • Limited to command-line interface (no GUI)
  • Depends on external cryptographic providers
  • No advanced page-level content manipulation

Understanding the result

Open-source command-line tool for encrypting, decrypting, and manipulating PDFs.

Tool details

  • Clearly flagged when a network request is needed.
  • No account, no sign-up, and no tracking of your content.
  • Powered by (Apache-2.0).
Built with
(qpdf/qpdf)
License
Apache-2.0
Runs locally
No — requires a network request
Verification
Not yet verified
Input
Query
Output
Text
Open-source source & license

Built with qpdf/qpdf. OpenToolVault provides the discovery and browser interface while crediting the original project maintainers.

Built with
License
Apache-2.0
View source on GitHub

Open-source project

OpenToolVault is an independent directory. We are not affiliated with or endorsed by this project.

References

Frequently asked

What is qpdf and what does it do?

qpdf is a command-line tool and C++ library for transforming PDF files while preserving their content. It enables tasks like encryption, linearization, splitting, merging, and inspection without altering the document’s structure or data. It is designed for developers and system administrators needing precise control over PDF metadata and binary format.

How does qpdf handle encryption and decryption?

qpdf supports encryption using AES-128 or RC4 algorithms. Users can specify user and owner passwords via command-line options, which apply encryption to the PDF’s content and metadata. The tool does not perform decryption but can verify encrypted files by checking password protection flags in the PDF’s trailer.

How do I split a PDF into multiple files?

Use the 'qpdf --split' command with page range specifications. For example, 'qpdf --split 1-2 input.pdf output1.pdf output2.pdf' splits the first two pages into separate files. Ensure the input file is valid and the page ranges are correctly formatted.

How does qpdf compare to tools like PDFtk or pdftk?

qpdf focuses on low-level, content-preserving transformations with strict adherence to PDF standards, while PDFtk (now deprecated) offered higher-level utilities like text extraction. qpdf lacks GUI tools but provides deeper customization for developers. Both tools handle encryption and merging, but qpdf emphasizes binary accuracy over convenience features.

What should I do if qpdf throws an error about missing dependencies?

Check that required libraries like zlib and cryptographic providers are installed. For example, on Linux, install 'zlib1g-dev' and ensure OpenSSL is available. Verify system paths for dynamic libraries, and rebuild qpdf if dependencies are updated. Consult the build documentation for platform-specific requirements.

Spotted something wrong with qpdf, or want to maintain it? See how to help.