~ gs -sOutputFile=biniou.pdf -sDEVICE=pdfwrite \ -dCompatibilityLevel=1.4 FairePart.pdf < /dev/nullWhat a surprise ! The output did shrink by a factor of 4:
~ ls -lh FairePart.pdf biniou.pdf -rw-r--r-- 1 vincent vincent 1.1M 2007-10-10 22:56 biniou.pdf -rw-r--r-- 1 vincent vincent 5.7M 2007-10-10 18:14 FairePart.pdfA quick check with
identifyshows that all the images kept the same resolution. That must be a question of JPEG conversion, or something of this spirit... Then, another try is to add the
-dPDFSETTINGS=/screenoption to the command-line:
~ gs -sOutputFile=biniou.pdf -sDEVICE=pdfwrite \ -dPDFSETTINGS=/screen -dCompatibilityLevel=1.4 FairePart.pdf < /dev/nullThen, output file is minuscule:
~ ll biniou.pdf -rw-r--r-- 1 vincent vincent 34K 2007-10-11 00:09 biniou.pdfThe downside is, the output is pretty much ugly (well, you wouldn't have hoped anything good with a win of a factor of 150). Images went down from 2576x1932 to 322x241 or even smaller (depends on the physical size of the image).
-dPDFSETTINGS=/ebookgave a slightly better output (for 70K), but still not good for my case... So I tweaked the pdfwrite parameters by hand:
gs -sOutputFile=biniou.pdf -sDEVICE=pdfwrite \ -dColorImageDownsampleType=/Bicubic -dColorImageResolution=300 \ -dDownsampleColorImages=true -dCompatibilityLevel=1.4 \ FairePart.pdf < /dev/nullThis gave me a pretty nice result. And this also shows that my image resolution was way too big anyway - 300 dpi is probably the best I'll get when printing... and the file produced is still ridiculously small (172K) ! I now start to realize the power of
ghostscript, and I thank its authors for it !