← Back to Open-Source PDF Software

Open-Source PDF Software Capable of Repairing Corrupted PDFs

Repair malformed/corrupted PDF files

4 tools

Python

pdfly

Cli

Pure-Python CLI (companion to pypdf) with commands including 2-up/booklet page layout, cat (extract/merge pages), check-sign (verify signatures), compress/uncompress, extract-annotated-pages, extract-images, extract-links, extract-text, meta/pagemeta, rm (delete pages), rotate, sign, update-offsets (repair simple PDFs), and x2pdf (convert other formats to PDF pages).

Tested
Java

PDFtk Server

Cli

Command-line tool to merge, split, and rotate PDFs; fill forms with FDF/XFDF data and flatten them (or generate an FDF stencil from a form's fields); encrypt and decrypt with passwords; add watermarks and stamps; manage bookmarks, metadata, and attachments; repair damaged PDFs; and recompress page streams. The Java-rewritten 'Server' edition of the classic PDFtk command-line tool, maintaining the same CLI interface and command syntax as the original.

Tested
Python

pikepdf

Library

Pythonic wrapper around qpdf for reading, writing, and manipulating PDFs: merge, split, rotate, rearrange, and delete pages; read/write XMP and DocumentInfo metadata (auto-synced); losslessly extract or replace embedded images (preserving original JPEG compression); open password-protected files and save with RC4, AES-128, or AES-256 encryption (or remove it); linearize for 'fast web view'; direct object-level/content-stream access; automatic repair on open; access to qpdf's Job API; and Jupyter notebook preview rendering.

C++

qpdf

Library

Low-level, content-preserving PDF structure tool: linearizes PDFs for fast web view, encrypts and decrypts, splits and merges files, inspects and edits PDF object structure directly, and repairs damaged files without altering actual page content. Explicitly does not render pages or extract text — its own documentation is clear this is a structural transformation tool, not a content-reading one, and points elsewhere (e.g. the `pdftools` R package) for extraction needs.

Tested