Bug 692018

Summary: Error: /typecheck in --filter--
Product: Ghostscript Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: PDF InterpreterAssignee: Alex Cherepanov <alex>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P2    
Version: master   
Hardware: PC   
OS: All   
Customer: 850 Word Size: ---
Attachments: patch

Description Marcos H. Woehrmann 2011-03-03 19:55:16 UTC
The customer states and I've verified that the attached PDF file cannot be read by Ghostscript head (r12231) nor 9.01 though earlier version (e.g. 8.54) can read it (I'm searching for the responsible rev now).

The command line I'm using for testing:

  bin/gs -sDEVICE=ppmraw -o test.ppm ./58223.PDF
Comment 2 Marcos H. Woehrmann 2011-03-03 19:56:29 UTC
Ken performed some analysis:

The CCITTFaxDecode filter is supplied a parameter dictionary:

/DecodeParms<</K -1/Columns 2 0 R/Rows 3 0 R>>

The problem is that the Columns and Rows are object references, not values. If I replace these with actual values:

/DecodeParms<</K -1/Columns 3296 /Rows 2196 >>

Then the PDF file is rendered correctly (or rather, the same as Acrobat).

It seems crazy to me to have these as references, but the PDF Reference doesn't seem to say there's any problem with that, and Acrobat opens the file, so I suppose we'll have to support it.
Comment 3 Marcos H. Woehrmann 2011-03-03 19:59:00 UTC
Adobe Acrobat 9.42, Apple Preview 5.0.3, and muPDF all read the file without problem.
Comment 4 Marcos H. Woehrmann 2011-03-03 20:37:47 UTC
This file broke in r11840.
Comment 5 Alex Cherepanov 2011-03-04 06:18:37 UTC
Created attachment 7318 [details]
patch

Add missing test for /packedarraytype during recursive dereferencing
of composite PDF objects.
Comment 6 Alex Cherepanov 2011-03-04 06:19:20 UTC
The patch has been committed as a rev. 12237.