qpdf
Transform and manipulate PDF files
TLDR
Extract pages 1-3, 5 and 6-10 from a PDF file and save them as another one
Merge (concatenate) all the pages of multiple PDF files and save the result as a new PDF
Merge (concatenate) given pages from a list of PDF files and save the result as a new PDF
Write each group of n pages to a separate output file with a given filename pattern
Rotate certain pages of a PDF with a given angle
Remove the password from a password-protected file
SYNOPSIS
qpdf [
PARAMETERS
--decrypt
Decrypt an encrypted PDF file.
--encrypt
Encrypt a PDF file.
--password=[password]
Specify the password for decryption or encryption.
--linearize
Linearize a PDF file for faster web viewing.
--split-pages
Split a PDF file into individual pages.
--pages [inputfile] [page ranges]
Extract specific pages from a PDF file.
--concatenate
Concatenate multiple PDF files into one.
[inputfile]
The input PDF file to process.
[outputfile]
The output PDF file to be created.
--check
Check a PDF file for errors.
--version
Show qpdf version.
--help
Display help message.
DESCRIPTION
qpdf is a command-line tool and C++ library for structurally transforming PDF files. It can perform a variety of operations including linearizing PDF files, encrypting and decrypting, splitting and merging, repairing damaged files, and inspecting their internal structure.
Its primary function is to take one or more PDF files as input and produce one or more new PDF files, optionally applying transformations. qpdf can be used to examine PDF objects, extract data, or manipulate page layouts. It is a versatile tool for both simple and complex PDF processing tasks and widely used for PDF repair and manipulation in scripting environments.
CAVEATS
Some PDF files may use features that qpdf does not fully support. Decryption may fail if the password is incorrect or the PDF uses advanced encryption algorithms.
ERROR HANDLING
qpdf provides informative error messages when encountering issues during processing, helping users to diagnose and resolve problems. It often indicates if there is a corrupt or malformed PDF structure.
MEMORY USAGE
Be aware of the potential memory usage when processing large PDF files with qpdf, especially when performing operations like linearization or splitting. Memory limitations can sometimes cause unexpected behavior.
HISTORY
qpdf was initially developed to address the need for a robust and flexible PDF manipulation tool. Over time, it has evolved through community contributions and continued development, gaining features to meet growing PDF processing needs. Its open-source nature has made it a valuable resource for developers and system administrators dealing with PDF files.