提取字体时出现ghostscript错误?

时间:2013-09-30 13:24:41

标签: fonts ghostscript

嗨,这是我的Windows脚本,我试图从pdf中提取字体gs_toolbin_extractFonts.ps可在gs_toolbin_extractFonts.ps

获取
    C:\Program Files\gs\gs9.10\bin>gswin32c.exe -q -dExtractSubsets -dNODISPLAY gs_toolbin_extractFonts.ps  -c  d:\anil\telugu\marripalli.pdf
Error: /undefined in d:\anil\telugu\marripalli.pdf
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_p
ush   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1179/1684(ro)(G)--   --dict:0/20(G)--   --dict:79/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
GPL Ghostscript 9.10: Unrecoverable error, exit code 1

1 个答案:

答案 0 :(得分:0)

您的命令行为“-c filename”-c表示'以下是PostScript,直到我们到达-f',因此解释器会尝试将您的文件名视为PostScript,这无疑会失败。

extractfonts.ps不提取文本,它提取字体,如果要提取文本,请使用txtwrite设备。