Created
June 22, 2017 17:37
-
-
Save gsdefender/69d7ef6523aeebba77cb26fec9b28c07 to your computer and use it in GitHub Desktop.
A way to reduce the size of PDF sizes
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
#!/usr/bin/env bash | |
# $3 must be one of: screen, ebook, printer, prepress, from lower to higher quality | |
# h/t: https://www.techwalla.com/articles/reduce-pdf-file-size-linux | |
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS="/$3" -sOutputFile="$2" "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment