Bug 689753 - Problem reading PDF file: /undefined in --.execform1--
Summary: Problem reading PDF file: /undefined in --.execform1--
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: master
Hardware: Macintosh MacOS X
: P2 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-17 14:25 UTC by Marcos H. Woehrmann
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer: 353
Word Size: ---


Attachments
foo.pdf (10.55 KB, application/pdf)
2008-04-10 22:19 UTC, Alex Cherepanov
Details
patch (2.29 KB, patch)
2008-04-14 21:41 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2008-03-17 14:25:12 UTC
The customer reports and I've verified that the attached PDF file generates an error when read by 
Ghostscript 8.61 and head (r8601): Error: /undefined in --.execform1--.

Adobe Acrobat 8 and Apple Preview both read the file without error.

The command line I'm using for testing:

  bin/gs -sDEVICE=tiff24nc -o test.tif ./Out.pdf

Here's the complete Ghostscript 8.61 output:

GPL Ghostscript 8.61 (2007-11-21)
Copyright (C) 2007 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
   **** Warning:  File has an invalid xref entry:  4.  Rebuilding xref table.
Processing pages 1 through 12.
Page 1
Error: /undefined in --.execform1--
Operand stack:
   --nostringval--   --dict:5/14(L)--   2   F19   41.6667   --dict:6/6(L)--   --dict:6/6(L)--   
EX_CFF_Times_New_Roman   --dict:11/12(ro)(G)--   --nostringval--   --dict:7/7(L)--   1576   --
dict:7/7(L)--   --dict:5/13(L)--   --nostringval--   --nostringval--   --nostringval--   6   --
dict:10/40(L)--   --dict:10/40(L)--   FontType
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   12   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   
--nostringval--   --nostringval--   %array_continue   --nostringval--   false   1   %stopped_push   --
nostringval--   %loop_continue   --nostringval--   2210   --nostringval--   1853   4   11   %oparray_pop   
--nostringval--   false   1   %stopped_push   1852   4   11   %oparray_pop   --nostringval--   
(gstatetype)   --dict:0/0(L)--   --nostringval--   false   1   %stopped_push   --nostringval--   
%loop_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --
nostringval--   --nostringval--   %array_continue   --nostringval--   --nostringval--   --nostringval-
-   --nostringval--   --nostringval--   --nostringval--   %loop_continue   --nostringval--   --
nostringval--   --nostringval--   %array_continue   --nostringval--
Dictionary stack:
   --dict:1144/1684(ro)(G)--   --dict:2/20(G)--   --dict:75/200(L)--   --dict:75/200(L)--   --
dict:107/127(ro)(G)--   --dict:275/300(ro)(G)--   --dict:24/25(L)--   --dict:4/6(L)--   --
dict:21/40(L)--   --dict:1/1(ro)(G)--   --dict:10/13(L)--   --dict:53/60(ro)(G)--   --dict:18/30(L)--   -
-dict:1/2(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.61: Unrecoverable error, exit code 1
Comment 1 Marcos H. Woehrmann 2008-03-17 14:26:04 UTC
Created attachment 3870 [details]
Out.pdf
Comment 2 Alex Cherepanov 2008-04-10 22:19:06 UTC
Created attachment 3930 [details]
foo.pdf

This is a simplified sample file.

Ghostscript cannot read an embedded CFF CIDFont resource.
Acrobat Reader 5 cannot print this file to a PS printer, but Acrobat
reader 8 can. Probably, the CIDFont resource is incorrect.
Comment 3 Alex Cherepanov 2008-04-14 21:41:39 UTC
Created attachment 3941 [details]
patch

Repair broken CFF CIDFont stream generated by "Exstream Dialogue Version
6.2.004m
(DBCS)".

1. The CFF stream has a single Private DICT block but refers to it twice.
New version caches the DICT block that correspond to the Private stream.

2. The operands of ROS operator are too small and correspond to some random
values from the standard string table. The patch doesn't attempt  find
the right values nut converts the fetched names to strings to avoid a
typecheck error during resource handling.
Comment 4 Alex Cherepanov 2008-04-14 21:50:18 UTC
The patch is committed as a rev. 8641.
Regression testing shows no differences.
Since the fix changes only gs_cff.ps , tha patch is likely to be
compatible with earlier releases.