acrobat reduced size pdf with gs/im/other?

我只是一个虾纸丫 提交于 2021-01-28 13:40:10

问题


In Acrobat 11 Pro, I can do File > Save As Other > Reduced Size PDF (setting as Acrobat 10 viewer or later), which cut a PDF to about 40% and looks exactly the same.

I am wondering how I can achieve the same result with an open source tool like ghost script, image magick, or some adobe tools on a linux server via CL or PHP.


回答1:


gswin64c -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

This works pretty well to reduce the pdf file size. When getting used to ghostscript inside a batch script be wary of special characters. For example "%" is a special character for postscript so when using variable in cmd you have escape the character so % -> %% and %% -> %%%% This can cause a headache depending on what you are trying to do. Also paths are a pain, use CD and relative file paths.

Source



来源:https://stackoverflow.com/questions/18318628/acrobat-reduced-size-pdf-with-gs-im-other

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!