Optimize PDF files (with Ghostscript or other)

前端 未结 7 1406
名媛妹妹
名媛妹妹 2020-12-02 04:25

Is Ghostscript the best option if you want to optimize a PDF file and reduce the file size?

I need to store alot of PDF files and therefore I need to optimize and red

7条回答
  •  天命终不由人
    2020-12-02 04:59

    You can obtain good results by converting from PDF to Postscript, then back to PDF using

    pdf2ps file.pdf file.ps
    ps2pdf -dPDFSETTINGS=/ebook file.ps file-optimized.pdf
    

    The value of argument -dPDFSETTINGS defines the quality of the images in the resulting PDF. Options are, from low to high quality: /screen, /default, /ebook, /printer, /prepress, see http://milan.kupcevic.net/ghostscript-ps-pdf/ for a reference.

    The Postscript file can become quite large, but the results are worth it. I went from a 60 MB PDF to a 140 MB Postscript file, but ended up with a 1.1 MB optimized PDF.

提交回复
热议问题