How can I fix/repair a corrupted PDF file?

5 pts.
Tags:
PDF

Does anyone have any recommendation or procedures for repairing a corrupt PDF? When I open the file I get "There was an error opening this document. the file is damaged and cannot be repaired." There seems to be a myriad of tools out there but none that I could describe as reputable. Are there any opensource linux based solutions for this possibly?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Ghostscript will repair your corrupted PDF automatically… if it can open it in the first place (that is, if it is not damaged beyond repair). But afterwards you’ll still need to double-check the result…

On Linux, try this command:

 gs \
  -o repaired.pdf \
  -sDEVICE=pdfwrite \
  -dPDFSETTINGS=/prepress \
   corrupted.pdf

On Windows, try this one:

 gswin32c.exe ^
  -o repaired.pdf ^
  -sDEVICE=pdfwrite ^
  -dPDFSETTINGS=/prepress ^
   corrupted.pdf

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Subhendu Sen
    However, not sure this will help you to recover 100%, also u can try out with this tool called pdftk, download and try to repair. It is better to ask the source(from where u got this one) to send this file again.
    28,600 pointsBadges:
    report
  • edwinjhoffer
    Hello gremkoim,

    I found an article, it may help you to solve the problem: http://pdf-tips.blogspot.in/2014/08/how-to-repair-images-from-corrupted-pdf-files.html

    Thanks
    Edwin
    1,275 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following