Skip to content

Instantly share code, notes, and snippets.

@changwu-tw
Created October 5, 2015 21:58
Show Gist options
  • Save changwu-tw/97fed5dcbdf98cb77148 to your computer and use it in GitHub Desktop.
Save changwu-tw/97fed5dcbdf98cb77148 to your computer and use it in GitHub Desktop.
# Usage: compresspdf [input file] [output file] [screen*|ebook|printer|prepress]
compresspdf() {
gs -sDEVICE=pdfwrite -dUseCIEColor -dNOPAUSE -dQUIET -dBATCH -dPDFSETTINGS=/${3:-"screen"} -dCompatibilityLevel=1.4 -sOutputFile=$2 $1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment