I am preparing a Document to be downloadable from the web. The original file has some really high resolution images included (png result images, some >1200dpi), so the original file is 23 MB. Using a Standard technique in Mac OS that converted the images to have 300dpi reduced the size to beautiful 4,5 MB, but the fromt matter isn't numbered with i,ii,... anymore. So i would like to get a similar result already with XeTeX (i.e. the xdvipdfmx driver). Is there an option to specify that?
I don't think there's a way to do this through
xdvipdfmx, but it's easy to post-process the entire PDF file to downsample the images:
$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=<your-smaller-file>.pdf <yourfile>.pdf
Alternatively you can use the option
dPDFSETTINGS=/printer, which will produce a slightly smaller file, but generate a (harmless) warning relating to ICC profiles.
Ghostscript is a hugely powerful program, with more options than any mortal can know. Many of the options implement parts of the Adobe PDF distiller options. The downsampling in this example is given by the
-dPDFSETTINGS=printer which implements one of the basic Distiller configurations:
Presets the "distiller parameters" to one of four predefined settings:
/screenselects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
/ebookselects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
/printerselects output similar to the Acrobat Distiller "Print Optimized" setting.
/prepressselects output similar to Acrobat Distiller "Prepress Optimized" setting.
/defaultselects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file.
Here are the relevant individual options that pertain to downsampling images and their values for the different configurations:
Parameter name default screen ebook printer prepress ColorImageResolution 72 72 150 300 300 DownsampleColorImages false true true false false DownsampleGrayImages false true true false false DownsampleMonoImages false true true false false