Skip to content

Instantly share code, notes, and snippets.

@evacchi
Created August 15, 2014 20:21
Show Gist options
  • Save evacchi/67763e46dddcb1c08ef4 to your computer and use it in GitHub Desktop.
Save evacchi/67763e46dddcb1c08ef4 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ "$1" == "" ]; then echo USAGE: pdfcompress filename; exit; fi
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$1-compressed.pdf $1.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment