Several months ago, I wrote a blog post about reducing a PDF file’s size. Since then, I’ve used that technique many times. However, you may want to control the DPI (dots per inch) even more specific. Here’s how to do it:

gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.7 \
-dDownsampleColorImages=true \
-dDownsampleGrayImages=true \
-dDownsampleMonoImages=true \
-dColorImageResolution=120 \
-dGrayImageResolution=120 \
-dMonoImageResolution=120 \
-sOutputFile=output.pdf input.pdf

Hint: This also works on MacOS. Just install GhostScript using Homebrew:

brew install ghostscript