Post date: Dec 9, 2011 5:29:02 PM
Sometimes the generated pdf file size can be large, especially when the file contains a lot of high-quality figures, so we might want to be able to reduce the file size. Adobe Acrobat (8) Professional has such an option; go to Document>Reduce File Size. What if we don't have the software...How can we reduce the pdf file size from the command line in Ubuntu? Here is how
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -dPDFSETTINGS=/ebook -sOutputFile=output.pdf input.pdf
More details about the command can be found by typing
man gs
in the command line. Also I found the following URLs are very informative: