Repair a damaged PDF screenshot

Repair a damaged PDF

Rewrite a damaged PDF with Ghostscript, then open the result to prove it has readable pages. The file is sent to the tool server for that run and not stored.

Privacy First
0 Runs
Updated 2026-11-07
Runs on the tool server
No account needed
The upload is not stored
The result is verified

What this repair does

Rewrites a damaged PDF through Ghostscript, which rebuilds the cross-reference table, the object streams and the page tree from whatever the file still contains. That fixes the two failures that make a download unopenable: a file whose tail was cut off, and a file whose cross-reference table no longer matches its objects. Text that is still in the file is kept; pages that were never downloaded cannot be recovered.

How to use it

Choose the PDF and press Run. The file is read first, so the report can tell you whether it already parsed; either way it is rewritten, because a document can parse and still be missing its tail. The rebuilt file is opened again before it is returned: if it has no readable page, the run reports a failure instead of handing you a broken download.

What it cannot do

It cannot recover pages that are not in the file, and it cannot repair a document Ghostscript refuses to read at all. When that happens the message says so and no output file is returned.

Privacy and safety

The file is sent to the tool server for this run and is not stored. Ghostscript runs with a fixed argument list and a 60-second limit in a private temporary directory, and that directory is removed when the run ends, whether it succeeded or not.

Upload a damaged PDF and Ghostscript rewrites it into a new file, which the server then reopens to prove it has readable pages. A rebuild that produces an unreadable document is reported as a failure, not handed back as a success.

The tool works on the document's structure: a missing cross-reference table, a broken object stream or a truncated tail can be reconstructed. It cannot invent content that is not in the file, so a page whose text was never written stays blank.

The PDF may be up to 12 MB and, when it parses, up to 200 pages. The summary reports the byte count before and after, the page count of the result, and whether the input parsed at all before the rewrite.

What a rewrite can recover

Ghostscript reads the objects it can find and writes a fresh document from them. That fixes structural damage, which is the usual reason a PDF will not open, and it can drop duplicate or unreachable objects along the way, so the output is often smaller than the input.

The result is a new file named repaired.pdf. Fonts and images that were present are carried into it; a font that was referenced but never embedded is still missing, and the reader substitutes one, exactly as it would for the original.

  • Ghostscript rewrites the object structure
  • The output is reopened and its page count read
  • The summary states whether the input parsed

When repair is the wrong tool

A file that is a scan of a page is not damaged; it is a picture, and this page will return the same picture. Text extraction from a scan needs optical character recognition, which is a different job.

A file that requires a password is refused, because the server cannot read the objects it would rebuild. Remove the password first. A file over 12 MB is also refused before any work starts, with the measured size in the message.

How to use the repair form

Choose the damaged PDF in the Upload step and press Run; the file travels to the tool server once and is never stored. The run rewrites the object structure with Ghostscript and reopens the result before returning it.

Read the summary when the file comes back: the byte count before and after, the page count of the rebuilt file, and whether the input parsed before the rewrite. A refusal names its reason, such as a password, the 12 MB ceiling, or an output that still does not parse.

What to Expect

Best for

  • Opening a PDF whose cross-reference table or tail is damaged
  • Recovering a file that a viewer refuses to open
  • Producing a smaller, structurally clean copy of a working PDF

Not ideal for

  • Recovering text from a scanned page, which needs OCR
  • A password-protected file, which must be unlocked first
  • Restoring content that was never written into the file

What this tool keeps

  • The pages Ghostscript can still read
  • Embedded fonts and images that are reachable in the object tree
  • The page order of the recovered pages

What may need cleanup

  • Missing fonts, which the viewer substitutes
  • Pages that were unreachable and therefore are not in the output
  • Interactive features such as forms or annotations, which a rewrite may flatten

Common errors

  • Uploading a scan and expecting the text to become selectable
  • Uploading a protected file and reading the refusal as a failed repair
  • Assuming every page survived when the summary reports fewer than expected

Example use cases

  • Salvaging an emailed invoice that will not open
  • Producing a clean copy before archiving
  • Checking whether a suspect file is structurally readable

Sample input

A 900 KB PDF whose tail is truncated, uploaded without a password.

Sample output

A rebuilt repaired.pdf with its page count reported, the byte size before and after, and a note that the input did not parse.

Who this is for

  • Office workers with an unopenable attachment
  • Archivists checking a file's structure
  • Developers testing a PDF pipeline

Frequently asked questions

What can the PDF repair recover?

The pages Ghostscript can still read, their embedded fonts and images that are reachable in the object tree, in their original order.

Can it recover text from a scanned page?

No. That needs OCR, and repair does not perform it.

What if the rebuilt file is unreadable?

The result is reported as a failure rather than handed back as a success.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.