If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!
If you want to reduce PDF file size using command line you can use ghostscript.Ghostscript is used for PostScript/PDF preview and printing. Usually as a back-end to a program such as ghostview, it can display PostScript and PDF documents in an X11 environment.
Furthermore, it can render PostScript and PDF files as graphics to be printed on non-PostScript printers. Supported printers include common dot-matrix, inkjet and laser models.
Package gsfonts contains a set of standard fonts for Ghostscript.
Use the following command syntax to reduce your pdf files
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Replace your file names output.pdf,input.pdf files with your file names.
This is only example you can check man gs command for more options.
If you want to install ghostscript use the following command
sudo apt-get install ghostscript




My output file (66.5 KB) is bigger then input one (61.9 KB).
“-dPDFSETTINGS=/screen” suggest that the file is optimized for screen instead of printing. If this is the case you should point out to the readers that they are making files smaller, but removing quality needed for printing.
Unless this applies only to PDF files created by Adobe Acrobat (i.e. because they’re more bloated to begin with or something) I would suggest that your title should speak of “PDF file size” rather than “Adobe Acrobat file size”. Since 2008, PDF is an ISO standard and PDF viewing and creation may have nothing to do with Adobe software.
Hi there, Many thanks for the tip.
I tried reducing a PDF file of a scanned document of 2.5Mb, but the result was unreadable. (filesize 67Kb)
I found that by leaving out -dPDFSETTINGS=/screen, I got a very acceptable filesize of 250K
- readable
- small enough to send by email
Summary: leave out: -dPDFSETTINGS=/screen for better quality.
This tends to munch special characters and embedded PDF images.
Thanks!!! This was *exactly* what I was looking for! You made my day!!
Thanx this really helped. Reduced my PDF from 32MB down to 2MB without any visible difference in quality. Ideal for uploading.