Created
August 12, 2024 13:12
-
-
Save ddmitov/6f6a80fb79fcd0017315793364691b77 to your computer and use it in GitHub Desktop.
Bash script for shrinking the size of PDF files
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 -q -dNOPAUSE -dBATCH -dSAFER \ | |
-sDEVICE=pdfwrite \ | |
-dCompatibilityLevel=1.3 \ | |
-dPDFSETTINGS=/screen \ | |
-dEmbedAllFonts=true \ | |
-dSubsetFonts=true \ | |
-dColorImageDownsampleType=/Bicubic \ | |
-dColorImageResolution=72 \ | |
-dGrayImageDownsampleType=/Bicubic \ | |
-dGrayImageResolution=72 \ | |
-dMonoImageDownsampleType=/Bicubic \ | |
-dMonoImageResolution=72 \ | |
-sOutputFile=out.pdf \ | |
$1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment