How to fix a PDF that won’t open
· 5 minute read
A corrupted or incomplete PDF is often recoverable. The usual causes, quick checks to try first, and how rebuilding a damaged file works.
You click a PDF and get an error: "the file is damaged", "cannot be opened", or a blank page. The document may be the only copy, or one you need in an hour. Before you give up, it helps to know that damage to a PDF is usually damage to its index, not to the pages themselves.
Why PDFs break
- An incomplete download. The file was cut off, so the end, where the index lives, is missing.
- A crash during saving. A program stopped while writing, and left a half-written file.
- Mail and transfer problems. A gateway rewrote the attachment, or a transfer mode changed the bytes.
- Storage trouble. A drive or a memory card failed, or was removed before it finished writing.
- The wrong file. Something that is not a PDF has a .pdf ending, or a download gave you an error page instead of the document.
Quick checks before anything else
- Look at the file size. A file of a few kilobytes that should be megabytes is a failed download.
- Download or copy it again. A fresh complete copy beats any repair.
- Try another reader. Some programs are more forgiving than others, and a browser may open what a desktop viewer refuses.
- Check whether it asks for a password. A file that needs a password is not damaged; see Unlock PDF.
How a repair works
A PDF has an index, the cross-reference table, which tells a reader where each object is in the file. When that is missing or wrong, a strict reader gives up. A forgiving repair ignores the index, scans through the file looking for the objects themselves, finds the pages, and writes a new file with a correct index. If the pages are intact, the result is a normal PDF with the text still being text.
When the structure is too damaged to rebuild, a last resort is to draw whatever can be displayed and save each page as a picture. The pages look right, but the text is no longer text, and the file is usually larger. Running OCR on the result makes the words searchable again.
What a repair cannot do
- Bring back data that is not there. A file cut off at 60 per cent has lost the rest.
- Get past a password that you do not have.
- Turn a different kind of file into a PDF.
- Guarantee that interactive parts, such as form fields and links, survive.
After a repair
Check the page count against what you expected, and look through the pages. Keep the damaged original until you are satisfied with the result. If the document matters, send the repaired copy on to its owner for confirmation and ask for a fresh original.
Tools mentioned
- Repair PDF — Recover what can be read from a file that will not open.
- OCR PDF — Make a scan searchable by reading the words off it.
- Unlock PDF — Take the password off a file you own.