Skip to content

Instantly share code, notes, and snippets.

@orjanv
Created February 24, 2014 10:34
Show Gist options
  • Save orjanv/9185311 to your computer and use it in GitHub Desktop.
Save orjanv/9185311 to your computer and use it in GitHub Desktop.
pdf-compress: compress a PDF file
#!/bin/bash
# pdf-compress: compress a PDF file
Input="$1"
Output="$2"
gs -sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 \
-dNOPAUSE -dQUIET -dBATCH \
-sOutputFile="$Output" "$Input"
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment