Easily Resize PDF on Mac OSX and Linux

· 180 words · 1 minute read

On many occasions, you might want to resize a PDF to send it by Email or put it on the web. There are many useless Share- and Bloatware-tools (like Adobe Acrobat) that might or might not help you with that.

If you happen to work on a Linux, BSD or Mac OSX machine, you can simply use ghostscript for the task. It’s much faster and gets better filesizes than the Optimize-function of Adobe Acrobat.

All you need to do is to make sure ghostscript is installed and then put the following shortcut in your .profile or .bashrc in your home-directory.

<br /> pdfResize() {<br /> gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -dPDFSETTINGS=/$1 -sOutputFile=output.pdf $2<br /> }<br />
After that’s done, open a new Terminal-window and try the following command:
<br /> pdfResize screen MyDocument.pdf<br />
You should now find the resized document in a file called output.pdf in the same directory.

The first argument sets the quality. Available options are screen, ebook and printer. While screen gives you the smalles file size, printer provides better quality at a reasonable filesize.