Bug 688827 - Error: /typecheck in --closefile-- with corrupt PDF file
Summary: Error: /typecheck in --closefile-- with corrupt PDF file
Status: NOTIFIED DUPLICATE of bug 688736
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 8.54
Hardware: PC Windows XP
: P2 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-02 18:40 UTC by Ralph Giles
Modified: 2011-09-18 21:46 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-02 18:40:44 UTC
Customer reports failure to convert a PDF file to TIFF:

D:\ArtifaxSampleSets>D:\Progra~1\gs\gs8.54\bin\gswin32c.exe                     
-sDEVICE=tiffg4 -dSA                                                            
FER -dBATCH -dNOPAUSE -sOutputFile=289282.tif 289282.pdf                        
AFPL Ghostscript 8.54 (2006-05-17)                                              
Copyright (C) 2005 artofcode LLC, Benicia, CA.  All rights reserved.            
This software comes with NO WARRANTY: see the file PUBLIC for details.          
Processing pages 1 through 11.                                                  
Page 1                                                                          
Page 2                                                                          
Page 3                                                                          
Page 4                                                                          
                                                                                
   **** Warning: File has insufficient data for an image.                       
Error: /typecheck in --closefile--
Comment 1 Ralph Giles 2006-08-02 18:41:33 UTC
Created attachment 2399 [details]
289282.pdf

problem file
Comment 2 Ralph Giles 2006-08-02 18:44:29 UTC
Reproduced with HEAD on MacOS X with the X11 device.

The PDF file is corrupt. Acrobat Reader 7.0.8 on MacOS X fails to render page 4
as well, warning about "a drawing error, likely caused by low memory". Like
Acrobat, Ghostscript can render the remaining pages if run again with -dFirstPage=5.
Comment 3 Ralph Giles 2006-08-02 19:31:28 UTC
MacOS X Preview.app shows page 4 without complaint.
Comment 4 Alex Cherepanov 2006-08-02 19:41:59 UTC
typecheck in --closefile-- happens when an image operator fails in
the PDF interpreter in the stopped context. I have a patch for the stack mix-up
but there's still an error in the image.
Comment 5 Ralph Giles 2006-08-02 19:47:25 UTC
Alex, if your fix for the stack mixup allows Ghostscript to continue after the
image error, then it's appropriate to close this as a duplicate since the image
is damaged.

Judging from the behaviour of Preview.app there actually is image data in the
file, but we generally don't support damaged files where Acrobat also fails.
Comment 6 Alex Cherepanov 2006-08-02 20:39:57 UTC
This may not be exact duplicate of the bug 688736 but the fix proposed there as
a comment 14 also solves this case.


*** This bug has been marked as a duplicate of 688736 ***
Comment 7 Marcos H. Woehrmann 2011-09-18 21:46:22 UTC
Changing customer bugs that have been resolved more than a year ago to closed.