Compressing PDFs
Often I find myself with PDFs that are inexplicably large for what they are. Magento, for example, produces invoices that are 1Mb in size when they need only be 50Kb. Ghostscript to the rescue. It can compress any PDF to a variety of resolutions. See the following:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf -dPDFSETTINGS=/screen (screen-view-only quality, 72 dpi images) -dPDFSETTINGS=/ebook (low quality, 150 dpi images) -dPDFSETTINGS=/printer (high quality, 300 dpi images) -dPDFSETTINGS=/prepress (high quality, color preserving, 300 dpi imgs) -dPDFSETTINGS=/default (almost identical to /screen)
I find the ebook setting works fine for most documents