3

I have already looked at:

I tried ghostscript on both OS X and Windows. OS X gs gave the following error:

GPL Ghostscript 9.06 (2012-08-08) Copyright (C) 2012 Artifex Software, Inc.  All rights reserved. 
This software comes with NO WARRANTY: see the file PUBLIC for details. 

Error: /undefined in  600Ru600D0Fl0Ol2Al7Hl0Sl1Xl8c1E0x0Y0t5760x7680Y0M 
Operand stack:
Execution stack:   
%interp_exit   .runexec2   --nostringval--  --nostringval--   --nostringval--   2   
%stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   
%stopped_push   1894   1   3   
%oparray_pop   1893   1   3   
%oparray_pop   1877   1   3   
%oparray_pop   1771   1   3   
%oparray_pop   --nostringval--   
%errorexec_pop   .runexec2  --nostringval--   --nostringval--   --nostringval--   2   
%stopped_push   --nostringval-- 
Dictionary stack:   
--dict:1161/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)-- 
Current allocation mode is local Current file position is 677 
GPL Ghostscript 9.06: Unrecoverable error, exit code 1

Neither Acrobat Reader nor pro will load the file. I also tried the "Recovery Toolbox for PDF" on the Windows side, with no love.

Any ideas? Am I munging my ghostscript commandline? Here's the two commands I tried:

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

and

gs -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -sOutputFile=repaired.pdf corrupt.pdf
Giacomo1968
  • 58,727
Joe B
  • 39

1 Answers1

-1

Some PDF files are beyond repair. Adobe have put a lot of resources into ensuring that Adobe Reader and Acrobat can display malformed PDF files, so if Acrobat cannot load the PDF then it is most likely unrecoverable.

If you get the error message:

Reader could not open filename because it is either not a supported file type of because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).

Then the PDF has been mangled and the %PDF-header (e.g. usually something like %PDF-1.6 at the very top of the file when viewing in a text editor) cannot be found within the first 1024 bytes of the file.

Here's some more information from Adobe:

Error: "The document is damaged..." | Opening PDF

Rowan
  • 1,006