Let me see, cert.pdf is already a small 17 page text .pdf, no images.
Code:
du -c cert.pdf
212 cert.pdf
212 total
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -sOutputFile=Out.pdf cert.pdf
...
Page 13
Page 14
Page 15
Page 16
Page 17
du -c Out.pdf
240 Out.pdf
240 total
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -sOutputFile=Out.pdf cert.pdf
du -c Out.pdf
240 Out.pdf
240 total
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -sOutputFile=Out.pdf cert.pdf
du -c Out.pdf
244 Out.pdf
244 total
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -sOutputFile=Out.pdf cert.pdf
du -c Out.pdf
240 Out.pdf
240 total
So for that .pdf, which is already tight and small, that's about as good as you can get with -dPDFSETTINGS
Make the page size smaller.
Code:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -sPAPERSIZE=a6 -dFIXEDMEDIA -dPDFFitPage -sOutputFile=Out.pdf cert.pdf
du -c Out.pdf
244 Out.pdf
244 total
Change the dpi
Code:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -r200 -sOutputFile=Out.pdf cert.pdf
du -c Out.pdf
236 Out.pdf
236 total
Ok Lets make a poor quality pdf with a small page size
Code:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -r100 -sPAPERSIZE=a10 -dFIXEDMEDIA -dPDFFitPage -sOutputFile=Out.pdf cert.pdf
du -c Out.pdf
224 Out.pdf
224 total
It was already a real small pdf to start with. Probably get more reduction in size with a busy pdf.