Sunday, December 2, 2012

Compressing PDF files

Adobe Acrobat allows for managing PDF files but it is a bit expensive if you are not using it on a regular basis.
MAC OS X allows for PDF files creation as well, e.g., via the "Print" menu and "Options" (PDF of course).
So what? Well... The issue is that - very often - a PDF file can be rather big in size when generated from within MAC OS X using the default and provided tools. Once sent via Email, message's size restrictions may apply (usually 10 MB) and your message may be bounced if the file is reaching this limit.
This can be particularly annoying when sending PDF attachments like work certificates, certifications and the like as it would upset the receiver who will have extra work to do to consolidate all the PDF files you sent. Furthermore, sending all the documents in a single email message is easier to fold and - if need be - to retrieve for the receiver.

A solution would be to create a ZIP archive with all the PDF documents and attach it to your email message. So far so good but the sum of all the ZIP'ed documents might well exceed the 10 MB limit, still... So, you must find a workaround and there is one that I like as it can be used not only for fixing this email's size limit but also saving some disk space on your hard drive: I am used to keep documents in PDF format for later reading or references but their resolution is rather high, as their size. Most of these documents will never be printed. I am therefore using this trick for these files.

MAC OS X "Quick Look" can compress PDF files. Lauch Quick Look against a PDF file. From the "File" menu, use "Export" but opt for the "Reduce File Size" Quartz filter option.


It is working but the quality is not that good, and sometime hardly readable.

The solution? Install additional Quartz Filters. An excellent set of free filters created by Jérome Colas http://jed.iconus.ch/wp-content/uploads/2010/01/jcolas_filters.zip (Jérome's filters were previously hosted on idisk but as this service has been closed, some people are offering the same archive for download: jed.iconus.ch is one of them, thanks a lot)

For Snow Leopard and older versions, extract the ZIP archive to the user's Library. Restart Quick Look to enable the new filters.

For Lion and above, extract it to System's Library into the PDF Service folder.


A quick recap of what the library folder is and why you might want to access it. Mac OS X actually has three different Library folders:
  1. One located at the root of your hard drive
  2. One located in a folder called System at the root of your hard drive
  3. One located in every user’s home folder

To access the system's folder.
In the Finder use the "Go" menu  or simply press Command-Shift-G to bring up the Go to Folder dialog. To access the User Library, type in ~/Library and click Go. It is possible to type the path to any folder into this dialog. To access the System Library, type in /Library (without the ~).

Using the new Quartz Filters in Quick Look (Export menu)
Don't hesitate to experiment a bit first with a test PDF file...



Note that the Colorsync application can be used to create your own filters.