Reduce PDF file size
sudo apt install ghostscript
Usually it’s already there.
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed_PDF_file.pdf input_PDF_file.pdf
add the correct path of the input and output PDF file.
The dPDFSETTINGS parameter is what determines the compression level. It seems jpg is not supported, though I remember I could select that in Adobe Acrobat and have complete control over file size. Still it’s better than nothing, and way better then having a monstrous OS.
| dPDFSETTINGS | Description |
| /prepress (default) | Higher quality output (300 dpi) but bigger size |
| /ebook | Medium quality output (150 dpi) with moderate output file size |
| /screen | Lower quality output (72 dpi) but smallest possible output file size |