pdfを操作できるghostscriptというものがあります。
今回利用した環境は
CentOS7
です。
インストール
yum で入ります。
yum install ghostscript
以下のコマンドでpdfの圧縮サイズを変更できます。
gs -dDownsampleColorImages=true -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -sOutputFile=output.pdf input.pdf
-dPDFSETTINGS に以下が設定できます。
(一番解像度が低い)
/screen
(中間)
/ebook
(解像度が高い)
/printer
/prepress