ghostscript

Some useful PDF editing (and search) commands

  • Reduce PDF filesize: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf Allowed PDFSETTINGS are /screen, /ebook, /printer, /prepress, /default. (from the ghostscript package)
  • Convert a color PDF into grayscale: gs -sOutputFile=output.pdf -sDEVICE=pdfwrite -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray -dAutoRotatePages=/None -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH input.pdf (from the ghostscript package)