docs/tools/repair-pdf.md
When a PDF refuses to open, displays garbled content, or triggers errors in your viewer, this tool attempts to rebuild its internal structure. It uses QPDF's repair engine, which can recover data from many types of corruption -- broken cross-reference tables, truncated streams, invalid object references, and more.
The tool passes each file through QPDF with the --decrypt flag, which forces QPDF to read and rewrite the entire PDF structure, fixing recoverable issues along the way.