On many occasions, you might want to resize a PDF to send it by Email or put it on the web, today I had more than 50MB of PDF to be put as attachment of an article, and that was really too much. Using Linux you just need the program
ghostscript to do everything and with a few commands you’ll have your resized documents.
For example my 50MB of documents become 15MB once I resized the PDF keeping a good quality, much better,
As first thing install
ghostscript, for Ubuntu/Debian and Mint you just have to run this command from the terminal:
sudo apt-get install ghostscript
And now to resize your pdf you can use this command:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Replace the file names output.pdf and input.pdf with your file names.
These are the options that you can use to select the quality of the output:
-dPDFSETTINGS=/screen (screen-view-only quality, 72 dpi images) -dPDFSETTINGS=/ebook (low quality, 150 dpi images) -dPDFSETTINGS=/printer (high quality, 300 dpi images) -dPDFSETTINGS=/prepress (high quality, color preserving, 300 dpi imgs) -dPDFSETTINGS=/default (almost identical to /screen)
- Linux Terminal: Manage Processes with killall and kill
- Play your Music on Linux with Music Player Daemon
- How to measure memory usage in Linux
Find me on Google+