Bug 689509

Summary: Error reading PDF file: /undefined in --run--
Product: Ghostscript Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: PDF InterpreterAssignee: Ralph Giles <ralph.giles>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P2    
Version: master   
Hardware: All   
OS: All   
Customer: 670 Word Size: ---
Bug Depends on: 689058    
Bug Blocks:    

Description Marcos H. Woehrmann 2007-10-12 14:22:02 UTC
The customer reports and I've verified that the attached file cannot be read by
Ghostscript head (r8289) nor any older version.  Both Acrobat Reader 7.0 and
pdfedit open the file without complaint.

The command line I'm using for testing:

  bin/gs -sDEVICE=ppmraw -sOutputFile=test.ppm ./moplen_apd277.pdf

The error message generated by Ghostscript:

Error: /undefined in --run--
Operand stack:
   --dict:6/15(L)--   --dict:10/18(L)--   --dict:10/18(L)--   ColorSpace
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1905   1   3   %oparray_pop   1904
  1   3   %oparray_pop   1888   1   3   %oparray_pop   --nostringval--  
--nostringval--   2   1   5   --nostringval--   %for_pos_int_continue  
--nostringval--   --nostringval--   --nostringval--   --nostringval--  
%array_continue   --nostringval--   false   1   %stopped_push   --nostringval--
  %loop_continue   --nostringval--   42392   --nostringval--   --nostringval-- 
 --nostringval--   --nostringval--
Dictionary stack:
   --dict:1146/1684(ro)(G)--   --dict:2/20(G)--   --dict:75/200(L)--  
--dict:75/200(L)--   --dict:107/127(ro)(G)--   --dict:274/300(ro)(G)--  
--dict:23/25(L)--   --dict:4/6(L)--   --dict:26/40(L)--   --dict:1/1(ro)(G)--  
--dict:5/16(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript SVN PRE-RELEASE 8.61: Unrecoverable error, exit code 1
Comment 1 Marcos H. Woehrmann 2007-10-12 14:22:31 UTC
Created attachment 3468 [details]
moplen_apd277.pdf
Comment 2 Alex Cherepanov 2007-10-12 18:43:23 UTC
The PDF file has an image that uses /JPXDecode filter and omits the
color space. Currently this feature is not implemented.

The most straightforward fix is to prescan the image data and extract the
color space.
Comment 3 Ralph Giles 2007-10-16 09:45:42 UTC
If so, this is a duplicate of Bug 689058 which contains a workaround.
Comment 4 Ralph Giles 2008-12-18 18:13:22 UTC
This file is handled correctly with r9297.

The current fix only works for RGB images. I've opened bug 690207 for the known
issue with non-RGB images. This one is considered closed.