Created
September 22, 2011 09:38
-
-
Save slivero/1234422 to your computer and use it in GitHub Desktop.
Compress a pdf file using ghostscript (Should work on any OS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compresses a pdf file | |
# Compression level can be adjusted by changing -dPDFSETTINGS | |
# Possible values: | |
# -dPDFSETTINGS=/screen (screen-view-only quality, 72 dpi images) | |
# -dPDFSETTINGS=/ebook (low quality, 150 dpi images) | |
# -dPDFSETTINGS=/printer (high quality, 300 dpi images) | |
# -dPDFSETTINGS=/prepress (high quality, color preserving, 300 dpi imgs) | |
# -dPDFSETTINGS=/default (almost identical to /screen) | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment