pdf manipulation on linux
About qpdf
QPDF is a powerful command-line program for structural, content-preserving transformations of PDF files. It's a versatile tool that lets you manipulate PDFs in many ways without having to understand the complex PDF file format.
Key features of qpdf:
Jump to section titled: Key features of qpdf:- Merge and split PDFs: Combine multiple PDFs or extract specific pages
- Linearization: Optimize PDFs for web viewing (fast web view)
- Encryption/decryption: Add or remove password protection
- Metadata manipulation: View or modify PDF metadata
- Structure inspection: Examine the internal structure of PDFs
- Repair damaged PDFs: Fix some types of corrupted PDF files
- Convert between PDF versions: Update older PDFs to newer versions
Common usage examples:
Jump to section titled: Common usage examples:Extract specific pages
Jump to section titled: Extract specific pagesqpdf --empty --pages input.pdf 5-10 -- output.pdf
Remove specific pages (like pages 1-3)
Jump to section titled: Remove specific pages (like pages 1-3)qpdf --pages input.pdf 4-z -- input.pdf output.pdf
Merge multiple PDFs
Jump to section titled: Merge multiple PDFsqpdf --empty --pages file1.pdf file2.pdf file3.pdf -- combined.pdf
Password protection
Jump to section titled: Password protectionqpdf --encrypt user-password owner-password 256 -- input.pdf encrypted.pdf
Remove password protection
Jump to section titled: Remove password protectionqpdf --password=password --decrypt input.pdf output.pdf
Linearize for web viewing
Jump to section titled: Linearize for web viewingqpdf --linearize input.pdf output.pdf
QPDF is available for all major operating systems (Linux, macOS, Windows) and is a great alternative to pdftk with a more modern codebase and active development.
Content was generated by AI