gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output-ebook.pdf input.pdf基本上這樣就可以把 PDF 檔壓到很小-dPDFSETTINGS=/screen 可以壓到最小,但解析度很差需要 ghostscript 套件
ref. PDF compress in Linux with command line utilities