How to repair a PDF that won't open

What usually breaks inside a damaged PDF, how Repair PDF rebuilds the structure and recovers pages, and why a half-downloaded file can't be fully fixed.

Compress & convertBy the EddiesPDF teamUpdated 5 min read
Open Repair PDF

A PDF that won't open usually isn't broken in some mysterious way. Most of the time its internal index points at the wrong places, or the file just stops early. The first problem can often be fixed completely. The second can be partly fixed, and Repair PDF tries the gentle fix first and only falls back to something blunter for the pages that need it.

What no repair tool can do is bring back data that isn't in the file. If a download stopped halfway, the second half isn't damaged. It's missing.

What "damaged" usually means

A PDF is a collection of numbered objects (pages, fonts, images, the drawing instructions for each page) plus a cross-reference table near the end of the file that says where each object starts, down to the byte. A reader opens the file by jumping to the end, reading that table and following it.

That design explains the most common kinds of damage:

  • Truncated files. An interrupted download, an attachment that got cut off, a file copied to a USB stick that was pulled out too soon. The end of the file, cross-reference table included, is gone.
  • Wrong offsets. A tool wrote a bad table when it saved the file, or the file passed through something that changed its line endings, so every byte position after that point is off.
  • Damaged page content. The instructions that draw each page are usually compressed. A few wrong bytes in that compressed data and the whole stream fails to decompress, so the page shows up blank or throws an error.
  • Not a PDF at all. A web page with an error message saved under a .pdf name, or a file of 0 bytes.

Readers differ in how much of this they tolerate. Browsers and Adobe Acrobat Reader often rebuild a broken table quietly when they open a file, while stricter apps and upload portals refuse it outright. So a file that opens in Chrome but gets rejected by a job portal, or won't open in Preview on a Mac, is a good candidate for repair.

How Repair PDF works

There are no settings. The repair starts as soon as you add the file and runs in your browser, so the file isn't uploaded.

First it opens the file with a very tolerant PDF reader, mainly to find out how many pages are really there. Then it parses the structure again and writes a clean new file with a fresh cross-reference table. If every page's content decodes properly, that's the end of it, and text, links and form fields are kept exactly as they were.

If some pages have content that can't be decoded, only those pages are replaced. The tool draws whatever can still be displayed on that page and puts that picture in its place. The other pages stay as they were.

Before it offers the download, it checks that the new file opens and has the expected number of pages. If the structure is too far gone for any of that to work, you'll see "Standard repair failed. Recovering pages one by one..." and every page is rebuilt from what the tolerant reader can still draw.

Repairing a file step by step

  1. Open Repair PDF and drop the file on the upload box, or click to choose it.
  2. If the file has a password, you'll be asked for it first. The repaired copy is saved without the password.
  3. Wait while it shows "Repairing the file structure..." or "Recovering page 3 of 20...". There's nothing to click.
  4. Read the summary under the tick.
  5. Click "Download repaired file". It's saved as repaired-yourfile.pdf, next to the original.

Reading the summary

The message after the repair tells you which case you're in, and it's worth reading before you send the file anywhere.

"All 12 pages recovered with text, links and forms intact." is the best case. Something was wrong with the structure, but nothing on the pages was lost.

"Pages 4, 7 had damaged content and were rebuilt as images." means those two pages are now pictures. They look as they did when displayed, but their text can't be selected or searched any more, and any links or form fields on them are gone. Every other page is untouched.

"The file structure was too damaged, so 12 pages were rebuilt as images." means the fallback ran, and the whole document is now image pages.

"Page 9 couldn't be recovered and was left out." is the one to watch for. The repaired file has fewer pages than the original, and nothing on screen will remind you later.

Every result also carries the same warning: "The repaired PDF might not have all contents from the original file." Take it literally. A page that was only half drawn when the data ran out will be half drawn in the repaired copy too.

What it can't fix

Missing data. If the file is 3 MB and the original was 10 MB, the pages that lived in the missing 7 MB aren't anywhere in what you have. Getting the file again is nearly always better than any repair: download it again, ask the sender to resend it, or look for an earlier version in your sent mail or your cloud storage's version history.

Files that aren't PDFs. If the file is tiny, or opening it in a text editor shows HTML instead of a first line starting with %PDF, it was never a PDF. Often it's an error page from the site you downloaded it from, which tells you more than any repair could.

Passwords you don't know. Repair PDF needs to open the file, so it can't get past an open password. If you know the password, the guide on removing a password from a PDF explains the options.

Wrong content. If the file opens but shows the wrong characters, missing fonts or a blank page that was blank in the original too, that's not structural damage, and rebuilding the structure won't change it.

After the repair

If some pages were rebuilt as images and you need their text back, run the repaired file through OCR PDF. It adds an invisible text layer on top of the page images so you can search and copy again. The guide to making a scanned PDF searchable covers the settings.

Rebuilt pages are stored as JPEG images at up to 144 dpi, which can make the file bigger than the original. If that's a problem for email, Compress PDF can bring it back down.

And keep the damaged original. Don't overwrite it with the repaired copy. A fresh download or a different tool might get more out of it later, and once it's gone, the image pages are all you have.

Try Repair PDF
Free, no sign-up, and it works on your phone too.
Open Repair PDF

Also useful: OCR PDF · Compress PDF

More guides