Diagnose a broken PDF and rebuild it with a fresh cross-reference table — structural recovery, entirely in-browser.
Drop a broken PDF for a five-point diagnosis and structural rebuild
Repair runs entirely in your browser with pdf-lib and pdf.js. Your file is never uploaded. Structural recovery has limits — a truncated file cannot regrow missing bytes.
A PDF is a graph of numbered objects plus a cross-reference table (xref) that maps each object number to its byte offset. Most "corrupted PDF" failures are structural: a bad xref after a botched download, an interrupted write that truncated the file, offsets shifted by an email gateway, or a trailer that lost its %%EOF. This tool runs two independent parsers — pdf.js (the tolerant renderer browsers use) and pdf-lib (a strict parser) — and when the strict parser succeeds, it re-serializes every object with a fresh xref table and trailer, which fixes bad offsets, orphaned references, and malformed trailers. What it cannot do is regenerate bytes that are simply gone: a truncated file stays truncated, and image data that never made it into the file cannot be re-invented. The diagnosis panel tells you which case you are in — five checks, each marked ok, warn, or fail with an explanation.
The rebuild rewrites the object graph with a new cross-reference table — the fix for most 'file is damaged' errors.
Dana's accounting system rejects a vendor invoice with "file is damaged", but the vendor insists it opens on their side.