1

I'm using the package pdfpages to join many PDF documents. Some of them are scanned. Is there an option to reduce quality of those documents in order to make the resulting file size smaller?

1 Answers1

3

No, not in pdfpages and not natively within pdfLaTeX. pdfLaTeX can only treat the image data as an object that it extracts from one file and embeds in another.

You could do the conversion from within your LaTeX document by issuing an external command (e.g. ghostscript, depending on your operating system and installed software) to first create a low-resolution pdf that is then included with pdfpages, but this would add a fair bit of overhead to each run of pdflatex.

You're possibly better off producing a low-resolution version of the scanned pdf to include. Use your favourite method: a ghostscript incantation, adobe acrobat, an online converter (which probably uses ghostscript), or your scanner settings.

  • Oh and the link that Alan Munn provided in his comment (on the question) has some ways to compress pdfs using ghostscript, but these are mainly about forcing stronger compression, not resampling the jpeg-encoded data streams that are typical in scanned documents. Here is some ghostscript documentation for the pdfwrite device: http://ghostscript.com/doc/current/Ps2pdf.htm – Andrew Kepert Jan 23 '16 at 23:23