Install ghostscript, for Ubuntu/Debian:
sudo apt-get install ghostscript
Resize your pdf with the command:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Replace the file names output.pdf and input.pdf with your file names.
These are the options that you can use to select the quality of the output:
–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)