How it works

Why a PDF will not open

My PDF will not open. What is wrong with it?

Short answer

Usually one of four things: the download was incomplete, the file is password protected, it is not really a PDF, or its internal index is damaged. Only the last of these is "corruption" in the way people mean it, and it is the most recoverable of the four — a PDF carries enough redundancy that a damaged index can often be rebuilt from the objects still in the file.

The four things that usually went wrong

%PDF-1.7123

A download that stopped early

  1. The header arrived. This is why the file still looks like a PDF to your computer.
  2. Most of the objects arrived too — the pages really are in there.
  3. The cross-reference table and trailer did not. Without the map, a reader cannot find any of it, and the file will not open at all.
  • An incomplete download or transfer. Much the most common. The connection dropped, or the file was opened before it finished writing. A PDF ends with a marker and a pointer to its index; cut the end off and no reader can find its way in. Downloading again fixes it, and is worth trying before anything else.
  • It is encrypted. "Cannot open" and "needs a password" are the same experience if the prompt is suppressed or the reader reports it badly. If you have the password, unlock PDF removes the protection from a file you can already open — it is not a recovery tool and cannot get past a password you do not have.
  • It is not a PDF. A file named .pdf can be an HTML error page, a ZIP, or an image that something renamed. This happens a lot with files saved from a website that returned an error instead of the document.
  • The index is damaged. A PDF has a cross-reference table listing where every object lives. Edit a PDF with software that writes it badly, or lose bytes in the middle, and the table points at the wrong places.

Working out which one it is

A few checks, in the order that rules out the most for the least effort.

  • Compare the file size against the source. A file noticeably smaller than it should be was truncated. A file of 0 bytes never arrived at all.
  • Open it in a browser. Drag it onto a browser tab. Browser PDF viewers are often more forgiving than desktop readers, and a file that opens in one and not the other is damaged rather than encrypted.
  • Look at the first line. Open it in any plain text editor. A real PDF begins %PDF- followed by a version number. If the first thing you see is <!DOCTYPE html> or PK, you have an HTML page or a ZIP with the wrong name.
  • Try it in our own tools. Page count and file info reads the structure and reports what it finds. If it reads the page count, the file is fundamentally sound and the problem is with one reader.

What can be repaired, and what cannot

Repair PDF rebuilds a damaged file by scanning it for the objects that are still intact and constructing a fresh index around them. That fixes the common case — a broken cross-reference table on a file whose content is otherwise present — and it is genuinely effective.

What it cannot do is invent data that is not in the file. If a download stopped halfway, the second half does not exist and no tool can recover it; a repair may produce a shorter document containing the pages that did arrive, which is often still useful. Encrypted files cannot be repaired without the password, because the content cannot be read in order to be rebuilt.

Two things worth doing afterwards:

  • Check the whole document, not just that it opens. A repaired file can open cleanly and be missing pages or images. Page count against what you expected is the quickest test.
  • Re-save from a reader once it opens. This writes a clean, well-formed file and avoids the same damage propagating into everything you do next.

Repair runs in your browser, so a file you cannot open is not uploaded anywhere in order to be examined.

Tools this article covers

Sources

Primary documentation for the claims above.

Last reviewed: September 24, 2026

Published by iBuildPDF.

More from the knowledge base

Browse the knowledge base