Bug 688675

Summary: Reading / Converting PDF File created with Adobe Lifecycle Designer 7.0
Product: Ghostscript Reporter: Boris Weigel <b.weigel>
Component: PDF InterpreterAssignee: Dan Coby <dan.coby>
Status: NOTIFIED FIXED    
Severity: normal CC: b.weigel
Priority: P4    
Version: 8.53   
Hardware: PC   
OS: Windows XP   
URL: http://www.crossbase.cc/crossbase_clear/temp/Test3.zip
Customer: Word Size: ---

Description Boris Weigel 2006-04-26 01:47:07 UTC
Hi,

we get the following error message:

**** 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: /undefined in /BXlevel
Operand stack:
1 --dict:6/6(ro)(G)-- &#65533;&#65533;`&#65533;Mf0&#65533;wV&#65533;
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2
%stopped_push --nostringval-- --nostringval-- --nostringval-- false 1
%stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval--
--nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval--
false 1 %stopped_push --nostringval-- %loop_continue --nostringval--
Dictionary stack:
--dict:1125/1686(ro)(G)-- --dict:0/20(G)-- --dict:85/200(L)-- --dict:85/200(L)--
--dict:104/127(ro)(G)-- --dict:241/347(ro)(G)-- --dict:18/24(L)--
Current allocation mode is local
ESP Ghostscript 815.01: Unrecoverable error, exit code 1
display: Postscript delegate failed `Test3.pdf'
Comment 1 Ralph Giles 2006-04-26 10:17:58 UTC
The customer field is reserved for internal use.

Dan has confirmed in head.
Comment 2 Ralph Giles 2006-04-26 10:20:22 UTC
The file is broken, but loads correctly in Acrobat.
Comment 3 Ralph Giles 2006-04-27 12:15:33 UTC
Dan, Looks like this didn't get assigned properly yesterday. Please re-assign if
I've remembered incorrectly.
Comment 4 Dan Coby 2006-05-11 16:32:59 UTC
As previously mentioned, there is a bad xref entry.  The file also uses 
compressed object lists.  The xref recovery logic does not attempt to recover 
objects from compressed object lists.  In general, there is a problem with 
trying to recover compressed data.  The usual problem that causes the xref 
recovery logic to be invoked is file transfer programs that converts the end 
of line markers (CR, LF, CF/LF) and thus invalidates the xref data.  For non 
compressed data (typically ASCII) this does not create much of a problem. 
However anything which munges compressed data usually makes the data 
unrecoverable.
Comment 5 Alex Cherepanov 2006-05-11 18:09:59 UTC
The file is indeed broken but I managed to make it run on Ghostscript.

First, the PDF checking and rebuilding doesn't work yet for the files with
xref streams. It should be disabled with -dNoVerifyXref=true

Second, generation numbers in the xref stream are wrong.
The checking can be disabled with the following change in
pdf_base.ps  /checkgeneration { pop true } def

It is not yet chear how to make production quality fix for Ghostscript
to work around this bug.
Comment 6 Dan Coby 2006-05-17 16:41:43 UTC
Fix described in:

http://ghostscript.com/pipermail/gs-cvs/2006-May/006541.html