Last active
June 13, 2022 19:32
-
-
Save fsalehpour/d15018ee97e3069b94f91baea1fab07d to your computer and use it in GitHub Desktop.
Tips to do things with ghostscripts
This file contains hidden or 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
# Reduce the size of a PDF file | |
# https://askubuntu.com/a/256449/112818 | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output_reduced.pdf input.pdf | |
# Convert a PDF to grayscale colour | |
# https://superuser.com/a/164857/989263 | |
gs \ | |
-sOutputFile=output_gray.pdf \ | |
-sDEVICE=pdfwrite \ | |
-sColorConversionStrategy=Gray \ | |
-dProcessColorModel=/DeviceGray \ | |
-dCompatibilityLevel=1.4 \ | |
-dNOPAUSE \ | |
-dBATCH \ | |
input.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment