Mimsy Were the Borogoves

Hacks: Articles about programming in Python, Perl, Swift, BASIC, and whatever else I happen to feel like hacking at.

Quality compressed PDFs in Mac OS X Lion

Jerry Stratton, February 16, 2012

Lion Preview Export: Exporting a PDF using a Quartz filter in Lion.; macOS tricks; Mac OS X tricks; PDF

Save As… has been renamed to Export in Lion’s Preview.

I’ve verified that these instructions for using Preview to compress PDFs continue to work in Mac OS X Lion.

One minor problem is that the last paragraph—that you can even “filter while printing” without using Preview is no longer true, but it wasn’t true in Snow Leopard either. I can’t remember if it worked in Leopard or if it last worked in Tiger.

I took some screenshots but haven’t included them here; they really are exactly the same as when I wrote those instructions. The only real difference is that in Lion, “Save As…” has been renamed “Export…”.

The main issue, as Vinnie pointed out in the comments is that after you create the filter it doesn’t automatically show up in Preview’s list of Quartz filters. Either ColorSync or Preview is working from the wrong folder.

ColorSync saves your filters in your personal “Filters” folder under your “Library”. But Preview looks in “PDF Services” for the filters. Copy or move the new filter from your Library’s “Filters” folder to your Library’s “PDF Services” folder. If you want to make the filter available to everyone who uses your Mac, put it in the main “/Library/PDF Services” folder instead. Note that Lion has hidden the Library folder, so you’ll need to use the “Go” menu and “Go to folder…” to go to your “Library” folder, and also to go to the “/Library”, depending on whether you are making it available for yourself or for everyone.

Further note that Preview in Lion, but not Snow Leopard, (sometimes? always?) has problems finding Quartz filters inside your own PDF Services folder, so you may have to always put it in the main Library’s PDF Services folder instead. Oddly, the Print dialog doesn’t have any problem with this, only Preview.

This will work in Snow Leopard as well—and will sort of bring back the ability to use the filter directly while printing to PDF. The filters will be available under the PDF menu; on choosing a Quartz filter, it will immediately save the current document as a PDF. The Mac doesn’t seem to ask for a filename, and just deposits it on the Desktop, though some of that may have to do with settings on my computer.

In response to Quality reduced file size in Mac OS X Preview: You can use Quartz filters to reduce the size of your PDFs in Mac OS X while maintaining a high image quality.