Why PDFs break
A PDF is a set of parts (pages, fonts, pictures) followed by an index, the cross-reference table, that says where in the file each part starts, and a trailer at the very end that points to the index. Readers jump straight to the parts through the index. When the index is wrong, a reader either gives up with a message such as "the file is damaged" or shows a blank page, even though the pages themselves may be fine.
That is the most common damage, and it usually comes from how the file was moved rather than what is in it:
- A download or upload that stopped early, which cuts off the end of the file, index and trailer included.
- A file saved by a program that crashed, or changed by one that rewrote part of it without updating the index.
- A transfer that changed line endings, such as an old FTP client in text mode, which moves every part a few bytes away from where the index says.
- A stream with the wrong length written by faulty software, which makes a reader lose its place after it.
What Repair does
Repair ignores the index. It reads the file from start to end, part by part, finds every page it can, and writes a new file with everything in order and a correct index and trailer. Before that, it checks the original and lists what it found wrong; afterwards, it reads the repaired copy again, every part of it, and offers it only if every page it found is there.
Text stays selectable, pictures keep their quality, and links, bookmarks and form fields come along with the pages that hold them. The result tells you how many pages were recovered. If the original had no damage that can be found, the tool says so; you can still download a rewritten copy, though it will open the same way.
What can't be repaired
- What isn't in the file any more. A download cut off halfway has lost the pages that were in the missing half. Repair recovers what is there, not what was never received.
- Scrambled content inside a page. When a picture or the text of a page is itself corrupted, the page comes back, but that picture or text may be missing or look wrong. The result says when errors like that remain.
- A file that isn't a PDF. A file renamed to .pdf, or one so damaged that no page can be found, can't be repaired. The tool says so.
- Encrypted PDFs. A PDF with a password or limits has to be unlocked first, then repaired.
Your PDF is repaired by your browser, on your own device: it is never uploaded, and there is no account, watermark or daily limit. The checks run on qpdf, which the page downloads from this site the first time it is needed (licences). Once repaired, the file opens in the other tools here, such as Compress PDF and Merge PDF.
Updated