Last active
June 25, 2020 17:06
-
-
Save zmilonas/1a88aa83412b80f1106265c1d0a6a038 to your computer and use it in GitHub Desktop.
GhostScript command to compress large PDFs with a lot of images. Requirements: https://www.ghostscript.com. Usage: `./compress.sh <input file> <output filename sans pdf>
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
#!/bin/sh | |
gs \ | |
-sDEVICE=pdfwrite \ | |
-dCompatibilityLevel=1.4 \ | |
-dPDFSETTINGS=/ebook \ | |
-dEmbedAllFonts=true \ | |
-dSubsetFonts=false \ | |
-dNOPAUSE \ | |
-dQUIET \ | |
-dBATCH \ | |
-sOutputFile=$2.pdf \ | |
$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment