tags:

views:

495

answers:

1

I'm running GPL Ghostscript 8.70 (2009-07-31) on Windows XP. I have about 100 PDF files I've attempted to run through GS, but I'm having font-related issues on two separate groups of files from two different customers. I'm not sure if the issues could be related. Here are the two errors I receive:

    Loading Courier font from C:\Program Files\gs\fonts/cour.ttf... 2343384 986555 13583240 12261829 3 done.
    Using CourierNewPSMT font for Courier.
    Error: /rangecheck in --get--

Can't find CID font "Arial".
Substituting CID font /Adobe-Identity for /Arial, see doc/Use.htm#CIDFontSubstitution.
The substitute CID font "Adobe-Identity" is not provided either. Will exit with error.
Error: /undefined in findresource

I've tried just about everything I can think of with fontmap and cidfmap. Does anyone out there have a solution?

A: 

Taken from Ghostscript Bug Report:

First I tried to edit the cidfmap file adding following lines there:

/Arial-BoldMT           << /FileType /TrueType /Path 
(C:/WINDOWS/Fonts/ARIALBD.TTF)  /SubfontID 0  /CSI [(Unicode) 0] >> ;
/Arial-ItalicMT         << /FileType /TrueType /Path 
(C:/WINDOWS/Fonts/ARIALI.TTF)  /SubfontID 0  /CSI [(Unicode) 0] >> ;
/ArialMT                << /FileType /TrueType /Path 
(C:/WINDOWS/Fonts/arial.ttf)  /SubfontID 0  /CSI [(Unicode) 0] >> ;
/TimesNewRomanPSMT      << /FileType /TrueType /Path 
(C:/WINDOWS/Fonts/timesi.ttf)  /SubfontID 0  /CSI [(Unicode) 0] >> ;

This will allow the document to be rendered correctly but symbols were not readable, I tried to play with encoding setting but no luck, same unreadable symbols displayed.

Then I to defined a small dictionary:

/tempfontsdict 1 dict def tempfontsdict 
begin 
 /Arial-BoldMT       (C:/WINDOWS/Fonts/ARIALBD.TTF)  def
 /Arial-ItalicMT     (C:/WINDOWS/Fonts/ARIALI.TTF)  def 
 /ArialMT            (C:/WINDOWS/Fonts/arial.ttf)  def 
 /TimesNewRomanPSMT  (C:/WINDOWS/Fonts/timesi.ttf)  def 
End

And changed the pdf_font.ps:

       dup /FontFile knownoget not {
          dup /FontFile2 knownoget not {
            dup /FontFile3 knownoget not {
                %//null                 

    +           dup /FontName get 
    +           /tempFontName exch def
    +           tempfontsdict tempFontName known {
    +               dup /FontName get (Custom font change:) 
print == 
    +               tempfontsdict tempFontName get
    +               /tempFontFile exch def          

    +               dup /FontFile3 << /F tempFontFile >> 
put                      
    +               dup /FontFile3 get
    +           } {
    +               //null
    +           } ifelse                
            } if
          } if
        } if

This solved the problem but doesn’t look like a good solution for the issue.

Joshua Drake

related questions