有关加快GhostScript速度的任何提示? [英] Any tips for speeding up GhostScript?
问题描述
我有100页的PDF,大约50 MB.我正在针对它运行下面的脚本,每页大约需要23秒. PDF是纸质文档的扫描.
gswin32.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.3
-dPDFSETTINGS=/screen -sOutputFile=out4.pdf 09.pdf
我有什么办法可以加快速度吗?我已经确定-dPDFSettings=/screen
是使它变得如此缓慢的原因,但是如果没有它,我将无法获得良好的压缩...
更新:
好的,我尝试将其更新为以下内容.我是否正确使用-c 30000000 setvmthreshold
部分?
gswin32.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.3
-dPDFSETTINGS=/screen -dNumRenderingThreads=2 -sOutputFile=out7.pdf
-c 30000000 setvmthreshold -f 09.pdf
如果您使用的是多核系统,请使用以下多个CPU核:
-dNumRenderingThreads=<number of cpus>
让它使用多达30mb的RAM:
-c "30000000 setvmthreshold"
尝试禁用垃圾收集器:
-dNOGC
更多详细信息,请参阅Ghoscript文档中的 Improving Performance
部分. /p>
I have a 100 page PDF that is about 50 MBs. I am running the script below against it and it's taking about 23 seconds per page. The PDF is a scan of a paper document.
gswin32.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.3
-dPDFSETTINGS=/screen -sOutputFile=out4.pdf 09.pdf
Is there anything I can do to speed this up? I've determined that the -dPDFSettings=/screen
is what is making it so slow, but i'm not getting good compression without it...
UPDATE:
OK I tried updating it to what I have below. Am i using the -c 30000000 setvmthreshold
portion correctly?
gswin32.exe -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.3
-dPDFSETTINGS=/screen -dNumRenderingThreads=2 -sOutputFile=out7.pdf
-c 30000000 setvmthreshold -f 09.pdf
If you are on a multicore system, make it use multiple CPU cores with:
-dNumRenderingThreads=<number of cpus>
Let it use up to 30mb of RAM:
-c "30000000 setvmthreshold"
Try disabling the garbage collector:
-dNOGC
Fore more details, see Improving Performance
section from Ghoscript docs.
这篇关于有关加快GhostScript速度的任何提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!