← Back to Open-Source PDF Software

Open-Source PDF Software Capable of Repairing Corrupted PDFs

Repair malformed/corrupted PDF files

4 tools

Command Line

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); encrypt/decrypt with passwords; add watermarks/stamps; manage bookmarks, metadata, and attachments; repair damaged PDFs; and recompress page streams.

C++

qpdf

Library

Low-level, content-preserving PDF structure tool: linearizes ('fast web view'), encrypts/decrypts, splits and merges files, inspects/edits PDF object structure, and repairs damaged files. Explicitly does not render pages or extract text/content.

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.

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).