2

我在 Windows XP 上运行 GPL Ghostscript 8.70 (2009-07-31)。我尝试通过 GS 运行大约 100 个 PDF 文件,但我在来自两个不同客户的两组不同文件中遇到了与字体相关的问题。我不确定这些问题是否相关。这是我收到的两个错误:

    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

我用 fontmap 和 cidfmap 尝试了几乎所有我能想到的东西。有没有人有解决方案?

4

2 回答 2

1

取自Ghostscript 错误报告

首先,我尝试编辑 cidfmap 文件,在其中添加以下行:

/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] >> ;

这将允许正确呈现文档但符号不可读,我尝试使用编码设置但没有运气,显示相同的不可读符号。

然后我定义了一个小字典:

/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

并更改了 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

这解决了问题,但看起来不是解决问题的好方法。

于 2010-05-05T19:37:31.747 回答
1

注意:始终保持 GS 更新到最新版本,当前版本为 9.50。

遇到了同样的问题。解决了从包管理器中的 gs 8.70 更改为https://ghostscript.com/download/gsdnld.html提供的 gs 9.50(AGPL 版本)的问题

于 2017-02-23T19:55:22.050 回答