PaperKit › Repair PDF

Repair PDF

Repair a PDF that will not open: PaperKit rebuilds a broken index, a missing ending or junk before the header in your browser and tells you what was wrong.

How to use Repair PDF

  1. Drop the PDF that will not open.
  2. Click Repair PDF and read what was found.
  3. Download the rebuilt copy and check it.

How to repair a PDF that will not open

A PDF ends with an index, the cross-reference table, that tells a reader where every object in the file starts. When a download is interrupted, an email gateway alters the file, or a tool writes the wrong offsets, the index no longer matches and many readers refuse to open the document even though the pages are all still there. PaperKit ignores the index, scans the file object by object, and writes a new PDF with a correct one. It runs in your browser, so a confidential file that is already causing you trouble does not also get uploaded somewhere.

What it can fix

The rebuild handles the common structural faults: a cross-reference table that points to the wrong place, a missing trailer or end-of-file marker, a file cut off after the last complete object, and stray bytes before the %PDF header such as an HTTP response or an email envelope. In these cases text, fonts, images, links and form fields come back exactly as they were, because the objects themselves were intact.

  • Wrong or missing cross-reference table
  • Missing trailer or end-of-file marker
  • Junk before the header
  • Truncated file, when the page objects survived

The rescue mode

If the page objects themselves are damaged, a rebuild is not possible. PaperKit then asks pdf.js, a very forgiving renderer, to draw whatever pages it can still find and saves those drawings as a new PDF. You get the pages back as images at 150 dpi: readable and printable, but the text is no longer selectable. The result card says clearly which of the two paths was used, and OCR PDF can make a rescued file searchable again.

What it cannot fix

Data that is not in the file cannot be recovered. If a download stopped halfway, the pages in the missing half are gone and only the first pages return. A file that is zero bytes, or that is not a PDF at all despite its name, cannot be repaired; the tool says so. Password-protected PDFs need to be unlocked first, since their contents cannot be read without the password.

Reading the diagnosis

Before rebuilding, PaperKit checks four things and reports what it found: where the %PDF header is, whether the end-of-file marker is present, whether the pointer to the cross-reference table exists, and whether that pointer leads to a table. A file with none of these problems is simply rewritten cleanly, which also helps with documents some strict readers reject for minor violations.

After repairing

Open paperkit-repaired.pdf and page through it; the PaperKit PDF Viewer works for this. Compare the page count with what you expected. If the original came from an application you still have, exporting it again remains the most reliable fix. Keep the damaged file until you are satisfied with the result.

Next steps

Related PDF tools

Frequently asked questions

How do I fix a PDF that will not open?

Drop it on PaperKit Repair PDF. The tool scans the file for intact objects, rebuilds the index readers need, and downloads paperkit-repaired.pdf. It also tells you what was wrong, such as a missing end-of-file marker.

Will I lose text or images?

Not when the index is the problem, which is the usual case: the content is copied unchanged. Only if the page objects are damaged does the tool fall back to saving pages as images, and it says so.

Can it recover a PDF from an interrupted download?

It recovers the pages whose data arrived. Pages in the part of the file that is missing cannot be restored by any tool.

Is the damaged PDF uploaded?

No. The scan and the rebuild run in your browser tab.