Bug 690372 - Error: /undefined in %Type0BuildGlyph
Summary: Error: /undefined in %Type0BuildGlyph
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: 0.00
Hardware: PC Linux
: P2 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-02 10:01 UTC by Marcos H. Woehrmann
Modified: 2011-09-18 21:46 UTC (History)
0 users

See Also:
Customer: 850
Word Size: ---


Attachments
simplified sample file (7.53 KB, application/pdf)
2009-04-06 22:38 UTC, Alex Cherepanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2009-04-02 10:01:37 UTC
The attached PDF file generates an error when read by Ghostscript.  The current
head (r9513) generates the generic "Error: /undefined in --run--" error but
gs8.54 generates a "Error: /undefined in %Type0BuildGlyph" error.

Acrobat reader and evince both open the file without complaint.

The command line I'm using:

  bin/gs -sDEVICE=ppmraw -o test.ppm ./30470.pdf
Comment 1 Marcos H. Woehrmann 2009-04-02 10:03:11 UTC
Created attachment 4885 [details]
30470.pdf
Comment 2 Alex Cherepanov 2009-04-06 22:38:29 UTC
Created attachment 4904 [details]
simplified sample file
Comment 3 Ken Sharp 2009-07-06 08:57:41 UTC
I haven't finished with this one yet, but as far as I can see the CIDFont/CMap
is broken. It seems that the CMap doesn't result in any valid glyphs from the
font, as a result we try to use CID 0 (the /notdef) which also fails, so we give
up with an error.

Acrobat renders this without complaint, but also without drawing any of the
text. Its debatable which is 'correct', since neither produces what the user
presumably entered as text.

I intend to research this further, but at the moment I'm inclined to say this
isn't really a bug.
Comment 4 Ken Sharp 2009-07-08 07:07:49 UTC
This is fixed in revision 9847, patch here:
http://ghostscript.com/pipermail/gs-cvs/2009-July/009544.html

Note that (as explained in the change log) the PDF file is fundamentally flawed.
The embedded font defined in the document (Helvetica) is defined as a CIDFont
using the Identity-H CMap. This CMap expects all character codes to be two bytes
in length, however the text using this font is all single bytes. 

Each pair of single bytes is treated as a single character code, and decoded
through the CMap, resulting in a CID which does not exist in the font, and
therefore use of the /.notdef to replace every glyph.

The error was caused because two of the strings contain odd numbers of bytes (1
in each case) which cannot be decoded through the CMap. This now also properly
falls back to the /.notdef glyph.

The missing text reads "0 5 25 75 95 100 GSG Inline Design features and benefits
A1 keskiviikko, 12. syyskuu 2007 08:39:14"

I notice that the file has apparently been produced by 'Corel PDF Engine Version
1.0.0.458', the bug should probably be reported to Corel, assuming that some
third party tool hasn't been used to modify the file.
Comment 5 Marcos H. Woehrmann 2011-09-18 21:46:23 UTC
Changing customer bugs that have been resolved more than a year ago to closed.