admin管理员组文章数量:1335436
We're using Ghostscript to embed fonts into PDF files and compress them at the same time. Recently, when upgrading to Ghostscript 10, we noticed that the process took significantly longer than before. We were able to restore the old performance by adding -dNEWPDF=false
, but of course that can only be a temporary fix.
This is our invocation (inspired by .ts#L242):
gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dEmbedAllFonts=true -dSubsetFonts=true -dColorImageDownsampleType=/Bicubic -dColorImageResolution=144 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=144 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=144 -sOutputFile=${output} ${input}
While trying to debug the issue, I noticed two differences between the output of the command with NEWPDF enabled and disabled:
- The new interpreter outputs several
warning: ignoring zlib error: incorrect data check
messages to stderr that the old one doesn't. - Without
-q
, the old interpreter repeatedly writes messages like these:
Can't find (or can't open) font file /usr/share/ghostscript/10.00.0/Resource/Font//usr/sh.
Can't find (or can't open) font file ArialMT.
Loading ArialMT font from /usr/share/fonts/truetype/Arial.ttf... 8289900 6751216 7254872 5777824 4 done.
where the new one simply writes
Loading font ArialMT (or substitute) from /usr/share/ghostscript/10.00.0/Resource/Font/NimbusSans-Regular
Whether those differences are relevant or not, the new interpreter is consistently slower. Is there something we can do to speed it up?
We're running GS 10.0.0 on a Debian 12 system with the following fonts packages installed: fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf
.
本文标签: Ghostscript39s new PDF interpreter slower at embedding fontsStack Overflow
版权声明:本文标题:Ghostscript's new PDF interpreter slower at embedding fonts? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742341165a2456630.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论