Friday, 18 April 2025

Change pdf filesize

This option changes the resolution of the output file in ghostscript.

-dPDFSETTINGS=/screen

So, for example

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -sOutputFile=output.pdf file1.pdf file2.pdf

Options are:

  • screen (72 dpi)
  • ebook (150 dpi
  • printer (300 dpi)