[gs-bugs] [Bug 691345] Undefined in findresource for Arial and Adobe

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Tue Mar 1 06:15:45 UTC 2011


http://bugs.ghostscript.com/show_bug.cgi?id=691345

ant at symons.net.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ant at symons.net.au

--- Comment #19 from ant at symons.net.au 2011-03-01 06:15:40 UTC ---
Thanks to this bug report I was able to solve this issue on my system. I'd just
like to give additional details.

Firstly, here was the error message:

]# pdf2ps  doc-01.pdf test.ps
Error: /undefined in findresource
Operand stack:
   --dict:6/15(L)--   F9   9.96   --dict:6/6(L)--   --dict:6/6(L)--   Arial  
--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   1878   1   3   %oparray_pop  
1877   1   3   %oparray_pop   1861   1   3   %oparray_pop   --nostringval--  
--nostringval--   2   1   1   --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:1152/1684(ro)(G)--   --dict:1/20(G)--   --dict:75/200(L)--  
--dict:75/200(L)--   --dict:108/127(ro)(G)--   --dict:288/300(ro)(G)--  
--dict:23/25(L)--   --dict:6/8(L)--   --dict:21/40(L)--   --dict:6/15(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.71: Unrecoverable error, exit code 1

I knew ghostscript often has trouble with fonts, and doesnt seem to try a best
guess substitution, so I read between the lines that "Error: /undefined in
findresource" and "Arial" in the next line probably indicated a problem with
the Arial font. This made sense, as this is on a linux machine :)

So, I found an rpm of the ms core fonts. I found one here, but I know they can
be sourced all over the net:

ftp://ftp.gwdg.de/pub/linux/misc/suser-jengelh/AnyDistro/noarch/MicrosoftFonts-1-jen14.noarch.rpm

Then I edited /usr/share/ghostscript/8.71/Resource/Init/cidfmap.GS (fedora 14)
and added:

/Arial << /SubfontID 0 /CSI [(Artifex) (Unicode) 0] /Path
(/usr/share/fonts/truetype/arial.ttf) /FileType /TrueType >> ;

And the pdf converted successfully. Thanks those who helped with the fix.

Feature requests:

1) Could the error message be modified so that after the stack dump, something
like "Unable to find font Ariel, or fall back font Adobe-Identity" (that was
about the gist of it I think?).

2) Could ghostscript be modified to try harder to use a font of about the
expected size for the unknown font scenario by default, so rather than break, a
best-as-possible rendering is produced?

For reference, pdfinfo tells me this is the format of my source file:

# pdfinfo  doc-01.pdf 
Title:          Creditor Purchase Order
Subject:        <removed> SMARTExport Document Generator
Keywords:       Version 2.0 Build 2060 - Patch ID#206038 (010509)
Author:         <removed>
Creator:        <removed>
Producer:       Amyuni PDF Converter version 4.0.1.0
CreationDate:   Mon Feb 26 14:54:50 2011
ModDate:        Mon Feb 26 12:54:51 2011
Tagged:         no
Pages:          1
Encrypted:      yes (print:yes copy:yes change:no addNotes:no)
Page size:      595.25 x 841.9 pts (A4)
File size:      79142 bytes
Optimized:      yes
PDF version:    1.4

Thanks!

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list