【发布时间】:2010-09-23 02:20:52
【问题描述】:
我有一个 PDF,其中嵌入了我似乎无法使用的字体。现在,我正在使用 GhostScript 并尝试做两件事:
-
最小化 PDF 文件大小:
gswin32c -dSAFER -dBATCH -dNOPAUSE -dQUIET -sDEVICE=pdfwrite -sOutputFile=output.pdf input.pdf
-
将PDF转换为PNG(超级示例,用于创建其他缩略图):
gswin32c -dSAFER -dBATCH -dNOPAUSE -dQUIET -dFirstPage=1 -dLastPage=1 -r288 -sDEVICE=png16m -sOutputFile=output.pdf input.pdf
上述方法在处理扫描文档时效果很好。但是当我对嵌入字体的 PDF 运行它们时(PDF 是由应用程序动态生成的),它失败了。这是我得到的错误:
GPL Ghostscript 8.71: Warning: 'loca' length 274 is greater than numGlyphs 136 i
n the font UUGHDE+ArialMT.
GPL Ghostscript 8.71: Warning: 'loca' length 274 is greater than numGlyphs 136 i
n the font UUGHDE+ArialMT.
GPL Ghostscript 8.71: Warning: 'loca' length 188 is greater than numGlyphs 93 in
the font UUGHDE+Arial-BoldMT.
GPL Ghostscript 8.71: Warning: 'loca' length 188 is greater than numGlyphs 93 in
the font UUGHDE+Arial-BoldMT.
除了 GhostScript,我还可以访问 PDFTK 和 ImageMagick(可能会被 GraphicsMagick 取代)。我也愿意接受其他解决方案。
在 WAMP 上进行开发。部署到 LAMP。
建议?
【问题讨论】:
-
你最好对给你提示+帮助的人做出反应,比如这里:stackoverflow.com/questions/3732189/ghostscript-error。 -- 否则,你怎么能指望得到更多的帮助?
标签: pdf imagemagick ghostscript pdftk graphicsmagick