Bug 688822 - failure to repair broken xref table
Summary: failure to repair broken xref table
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.54
Hardware: PC Windows XP
: P2 normal
Assignee: Dan Coby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-01 15:19 UTC by Ralph Giles
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer: 384
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Giles 2006-08-01 15:19:42 UTC
Customer reports failure converting PDF to TIFF with Ghostscript 8.54:

"D:\Program Files\gs\gs8.54\bin\gswin32c.exe -sDEVICE=tiffg4 -dSAFER -dBATCH
-dNOPAUSE -sOutputFile=287810.tif 287810.pdf"

With HEAD on linux I see with the x11 device:

This software comes with NO WARRANTY: see the file PUBLIC for details.
   **** Warning:  An error occurred while reading an XREF table.
   **** The file has been damaged.  This may have been caused
   **** by a problem while converting or transfering the file.
   **** Ghostscript will attempt to recover the data.
Error: /syntaxerror in --token--

The xref table is in fact damaged. evince (libpoppler) is able to construct a
useful table.
Comment 1 Ralph Giles 2006-08-01 15:20:46 UTC
Created attachment 2392 [details]
287810.pdf

attaching problem file
Comment 2 Dan Coby 2006-08-07 15:40:20 UTC
The file has several problems.  For instance the end of the file contains:

startref
54593016
%%EOF

The line that says 'startref' should say 'startxref'.  This is supposed to 
give the location of the first xref table.  However there are only 2,210,991 
bytes in the file.  Thus a value of 54,593,016 is off by a factor of more than 
20.

I do not what application created this file.  It is not specified within the 
file.
Comment 3 Dan Coby 2006-08-08 17:39:14 UTC
Fix described in:

http://ghostscript.com/pipermail/gs-cvs/2006-August/006739.html

Note:  If anyone knows what application created this file, please strongly 
suggest to its creators that they correct their application.