A PDF that will not open is often not as broken as it looks. The format keeps a cross-reference table pointing at where each object lives in the file, and if that table is damaged — by an interrupted download, a failed transfer, a crash mid-save or a storage error — readers give up even though the actual page content is intact. Repair re-parses the file from the beginning, finds the objects that are still there, and writes a fresh, well-formed document around them. The work runs on our server, because a repair engine cannot sensibly be shipped to a browser: the damaged file streams through and the rebuilt one streams back, with nothing stored, though it does leave your device. What comes back depends entirely on how much survived — recovery is not reconstruction, and content that is genuinely absent stays absent.
What usually goes wrong
The cross-reference table is the most common casualty. It is an index of byte offsets, and it is written last, so a save or a download that stops early produces a file whose content is largely present and whose map is missing or truncated.
The other frequent cause is transfer damage: a file sent through a system that mangled line endings, an email gateway that altered the encoding, or a partial copy from failing storage. In all of these the object data is often recoverable even when no reader will touch the file.
What repair can and cannot do
It can rebuild the index, recover the objects that are still present, and produce a file that opens — frequently with everything intact, because the damage was structural rather than substantive.
It cannot invent what is missing. A file truncated at 60% of its length has 40% of its pages genuinely gone, and no amount of parsing brings them back. Nor can it repair a file that is not a PDF at all: a download that returned an error page, or an encrypted file mistaken for a corrupt one, both need a different fix.
Before you resort to repair
Try downloading or copying the file again from the source. A large share of unopenable PDFs are incomplete transfers, and a clean copy is a better outcome than any repair.
Check the file size against the original if you can — an obviously small file is truncated rather than corrupt. And open it in a different reader first: browsers, Acrobat and macOS Preview have different tolerances, and a file one refuses will sometimes open in another well enough to print or re-save.