ghostscript减少PDF文件的大小 #
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -sOutputFile=output.pdf input.pdf
You can also use the following parameters for -dPDFSETTINGS instead of /screen: /screen – Lowest quality, lowest size /ebook – Moderate quality /printer – Good quality /prepress – Best quality, highest size
下面的命令可以查看所有支持的设备:
gs -h
pdfwrite设备用于生成pdf文档,具体的配置参数要查ghostscript的html文档"ps2pdf.htm"。