Bug 691819 - Error: /undefined in findresource
Summary: Error: /undefined in findresource
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Font API (show other bugs)
Version: 9.00
Hardware: PC Linux
: P4 normal
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-06 23:49 UTC by Jury Gorky
Modified: 2010-12-08 08:15 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
file that causes the problem (123.92 KB, application/pdf)
2010-12-06 23:49 UTC, Jury Gorky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jury Gorky 2010-12-06 23:49:23 UTC
Created attachment 7008 [details]
file that causes the problem

Ubuntu Linux 10.10

I'm trying to convert the pdf file to png format, but it fails with the following message:

$ gs derived375899.pdf 
GPL Ghostscript  9.00 (2010-09-14)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 2.
Page 1
Substituting font Times-Roman for TimesNewRomanPSMT.
Loading NimbusRomNo9L-Regu font from %rom%Resource/Font/NimbusRomNo9L-Regu... 3421080 2097206 6494708 5168386 3 done.
Substituting font Helvetica for ArialMT.
Loading NimbusSanL-Regu font from %rom%Resource/Font/NimbusSanL-Regu... 3535096 2210880 6535076 5198835 3 done.
Can't find CID font "ArialMT".
Substituting CID font /Adobe-Identity for /ArialMT, see doc/Use.htm#CIDFontSubstitution.
The substitute CID font "Adobe-Identity" is not provided either. Will exit with error.
Error: /undefined in findresource
Operand stack:
   --dict:6/15(L)--   F7   1   --dict:6/6(L)--   --dict:6/6(L)--   ArialMT   --dict:10/12(ro)(G)--   --nostringval--   CIDFontObject   --dict:8/8(L)--   --dict:8/8(L)--   Adobe-Identity
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1894   1   3   %oparray_pop   1893   1   3   %oparray_pop   1877   1   3   %oparray_pop   --nostringval--   --nostringval--   2   1   2   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %array_continue   --nostringval--   false   1   %stopped_push   --nostringval--   %loop_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %array_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %loop_continue
Dictionary stack:
   --dict:1149/1684(ro)(G)--   --dict:1/20(G)--   --dict:82/200(L)--   --dict:82/200(L)--   --dict:108/127(ro)(G)--   --dict:293/300(ro)(G)--   --dict:23/30(L)--   --dict:6/8(L)--   --dict:27/40(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript  9.00: Unrecoverable error, exit code 1

I've tried to put the substitution to /etc/ghostscript/fontmap.d/10gsfonts.conf, /var/lib/ghostscript/fonts/cidfmap, installed gsfonts, gsfonts-other, gsfonts-x11 packages, updated gs from 8.71 to 9.00. Also I've played with command-line params, specifying my own cidfmap file, but still no success.

I have found a couple of similar reports here, but didn't find the answer also.
Comment 1 Ken Sharp 2010-12-07 07:50:51 UTC
Your PDF file is req
Comment 2 Ken Sharp 2010-12-07 08:01:16 UTC
Hmm, sorry for the partial reply.

Your PDF file requests the CIDFont ArialMT (composed with the Identity-H CMap), but Ghostscript does not have a font with that name. GS then falls back to the default CIDFont which is given by composing the Ordering from the FontDescriptor, so it searches for a CIDFont called 'Adobe'.

It doesn't find that either, so it is forced to give up.

You need to add a font definition to cidfmap for ArialMT, the usual invocation would be something like:

/ArialMT << 
/FileType /TrueType
/Path (/...<path>..../arial.ttf)
/CSI [(Artifex) (Unicode) 0]
>> ;

If I edit /gs/Resource/Init/cidfmap on my system,and supply the relevant directory as a command line switch:

./gs -I/gs/Resource/Init

then your file works for me. Without that I get the same error message. 

Note that GS is generally compiled with its resources built into the executable. so modifying files on disk does not have any effect, unless you also direct GS to use those files by specifying them using -I
Comment 3 Jury Gorky 2010-12-08 08:15:18 UTC
Thank you!

The -I switch was the option I missed

(In reply to comment #2)
> Hmm, sorry for the partial reply.
> 
> Your PDF file requests the CIDFont ArialMT (composed with the Identity-H CMap),
> but Ghostscript does not have a font with that name. GS then falls back to the
> default CIDFont which is given by composing the Ordering from the
> FontDescriptor, so it searches for a CIDFont called 'Adobe'.
> 
> It doesn't find that either, so it is forced to give up.
> 
> You need to add a font definition to cidfmap for ArialMT, the usual invocation
> would be something like:
> 
> /ArialMT << 
> /FileType /TrueType
> /Path (/...<path>..../arial.ttf)
> /CSI [(Artifex) (Unicode) 0]
> >> ;
> 
> If I edit /gs/Resource/Init/cidfmap on my system,and supply the relevant
> directory as a command line switch:
> 
> ./gs -I/gs/Resource/Init
> 
> then your file works for me. Without that I get the same error message. 
> 
> Note that GS is generally compiled with its resources built into the
> executable. so modifying files on disk does not have any effect, unless you
> also direct GS to use those files by specifying them using -I