Ubuntu / Linux news and application reviews.

Ricardo Ferreira (who sent us quite a few tips before) wrote a nice Nautilus script which comes with a GUI (Zenity) to compress and optimize PDF files called Compress PDF.

The script currently comes in multiple languages: English, Spanish*, French*, Czech* and Portuguese (but you can translate it into your language if you want - there are only 10 short lines to translate) and you can choose between 5 different compression levels: Screen-view only, Low Quality, Hight Quality, High Quality (Color Preserving) and Default:

compress pdf script

As an example: compressing a PDF using the "Default" preset, the file size was reducced from 4,6mb to 3,3mb with no visible quality lost.


To use the script in Nautilus 3.4 or older - for Ubuntu versions older than 13.04 (12.04, 12.10 or older) -, run the following commands in a terminal:
sudo apt-get install zenity ghostscript
mkdir -p ~/.gnome2/nautilus-scripts
cd ~/.gnome2/nautilus-scripts
rm "Compress PDF" #in case you're using an older version
wget http://launchpad.net/compress-pdf/1.x/1.4/+download/Compress-PDF-1.4.tar.gz
tar zxvf Compress-PDF-1.4.tar.gz && rm Compress-PDF-1.4.tar.gz

To install the script in Nautilus 3.6 or newer - for Ubuntu 13.04 and newer -, use the following commands instead:
sudo apt-get install zenity ghostscript
mkdir -p ~/.local/share/nautilus/scripts/
cd ~/.local/share/nautilus/scripts/
rm "Compress PDF" #in case you're using an older version
wget http://launchpad.net/compress-pdf/1.x/1.4/+download/Compress-PDF-1.4.tar.gz
tar zxvf Compress-PDF-1.4.tar.gz && rm Compress-PDF-1.4.tar.gz

Then to use it, simply right click some PDF files and select "Compress-PDF" from the "Scripts" menu:

nautilus right click compress pdf


Credits for this script (and many thanks!): Ricardo Ferreira


*Spanish translation by Eduardo Battaglia
*French translation by astromb
*Czech translation by clever fox


Many thanks to all who translate the script!