ghostscript

How to shrink a .pdf file produced with pdflatex?

A common approach is to let Ghostscript (gs) optimize and
compress the PDF after it has been created with pdflatex.
Ghostscript is installed by most Linux distributions and
easily available for other platforms (Windows as binaries,
MacOS via MacPorts). In fact, almost all size-optimizing
tools for PDF (save for Acrobat) you can find on the
internet, internally use Ghostscript -- so you can as
well call it directly. There is a pletoria of options
available; I personally use the following:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=foo-compressed.pdf
foo.pdf
I use this mostly for beamer presentations, where it gets
me a size reduction of 60-70 percent. (A ten MiB lecture
note becomes three too four MiB in size.)