howto:compress-pdf
This is an old revision of the document!
Compress PDF
Command Line Utilities to Reduce PDF File Size in Linux
Using GhostScript
sudo apt install ghostscript
You can use this command to compress PDFs. Replace output.pdf/input.pdf and the PDFSETTINGS as required.
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
-dPDFSETTINGS Option | Description |
---|---|
-dPDFSETTINGS=/screen | 72 dpi |
-dPDFSETTINGS=/ebook | 150 dpi |
-dPDFSETTINGS=/prepress | 300 dpi |
-dPDFSETTINGS=/printer | 300 dpi |
-dPDFSETTINGS=/default | Multi purpose output PDF. |
howto/compress-pdf.1669725455.txt.gz · Last modified: 2023/05/29 11:53 (external edit)