Last active
March 12, 2021 13:04
-
-
Save niketpathak/fac38bdc5d37c87157681c5571713769 to your computer and use it in GitHub Desktop.
Compress Pdf in Ubuntu
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
# Use the following ghostscript command: | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \ | |
-dNOPAUSE -dQUIET -dBATCH -sOutputFile=/home/niketpathak/Downloads/output.pdf /home/niketpathak/Downloads/input.pdf | |
# Summary of -dPDFSETTINGS: | |
# -dPDFSETTINGS=/screen lower quality, smaller size. (72 dpi) | |
# -dPDFSETTINGS=/ebook for better quality, but slightly larger pdfs. (150 dpi) | |
# -dPDFSETTINGS=/prepress output similar to Acrobat Distiller "Prepress Optimized" setting (300 dpi) | |
# -dPDFSETTINGS=/printer selects output similar to the Acrobat Distiller "Print Optimized" setting (300 dpi) | |
# -dPDFSETTINGS=/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file | |
# src: https://askubuntu.com/questions/113544/how-can-i-reduce-the-file-size-of-a-scanned-pdf-file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment