Skip to content

ghostscript

Marcel Schmalzl edited this page Aug 18, 2019 · 6 revisions

Ghostscript

Compress PDFs

This script will create a compressed file "output.pdf" of the original PDF handed as argument:

# compress_pdf.sh
# Usage ./compress_pdf.sh my-pdf-larger-than-the-universe.pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dDownsampleColorImages=true -dColorImageResolution=150 -dNOPAUSE  -dBATCH -sOutputFile=output.pdf "$@"
Clone this wiki locally