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: speedtest_cli checks your real bandwidth speed.
- Zorin OS 9 Core Review: As good as Linux Mint 17!
- How to reboot Linux automatically on Kernel Panic
- Linux AIO some of the most common distributions in one ISO
- How to share on linux the output of your shell commands
Find me on Google+