Quality reduced file size in Mac OS X Preview
ColorSync makes Quartz filters.
If you use the print to PDF feature in Mac OS X, you have probably noticed that it can create some really large PDF files. This is fine as long as you are copying them to CD or DVD, but if you’re putting them on the web or sending them through e-mail, they can really cause havoc on both ends.
If you open the PDF in Preview, you can reduce the file size by doing a “Save As...” and choosing, appropriately, Reduce File Size from the Quartz Filter menu. Often, that will be fine. But the way that it reduces the file size is by saving all images as JPEGs of middle quality. Sometimes that quality will not be enough.
I just finished a Persistence of Vision tutorial, and because it’s a tutorial on using a 3-D raytracer it was full of images. The PDF file was nearly 20 megabytes. After saving it with Reduce File Size, it was down to under one megabyte... but the quality of the images was so bad that they didn’t serve to illustrate the concepts in the text.
It was obvious what was happening, and I knew that when saving JPEG files you are allowed to trade off low file size with increased quality. But there was no slider available in the Quartz Filter menu to increase the quality of the image.
The answer, it turns out, is in ColorSync Utility in the Utilities folder off of the Applications folder. ColorSync Utility can create new Quartz filters. Open up ColorSync Utility and switch to the “Filters” pane. This will list all of the filters that you currently have available.
- In the lower left, click on the “+” button. This creates a new filter.
- Give the filter a name, and press return.
- To the right of the filter’s name, choose the down arrow. A menu will pop up.
- From the pop-up menu, choose “Add Image Effects Component”, and from that menu choose “Image Compression”.
- Adjust the image compression Mode to JPEG.
- Adjust the image compression quality however you prefer.
- The next time you use Preview to “Save As...”, you'll have a new option under Quartz filters.
I’ve created a Reduced File Size High Quality and Mid-Quality as custom Quartz filters.
With the quality slider three quarters over, the file size dropped to 7.7 megabytes. This is quite a bit larger than with the slider half-way over, but not nearly the 20 megabytes of the original. And quality became a lot higher.
Filter while printing
You can also filter while printing, avoiding the need to re-open the PDF in Preview. When you go to print, pull down the menu just below “Presets” that usually says “Copies & Pages”. Choose “ColorSync”. Then choose the Quartz filter that you want. Once you’ve chosen it, you can also pull down the Presets menu and do a “Save As...” to remember these settings.
- Persistence of Vision tutorial
- A step-by-step tutorial, available under the Gnu Free Documentation License, on using the Persistence of Vision raytracer.
More Mac OS X tricks
- Command-line mail on OS X: re-alpine and Geektool
- If you do a lot of automated command-line scripts, you probably also generate a lot of mail to /var/mail. OS X only has the mail program built-in, and its GUI mail client hasn’t been able to add simple mail accounts since about OS X 10.2. Alpine can get you a better mail client, and Geektool can provide better notices.
- Stack windows on top of each other
- If you want to stack multiple windows directly on top of each other, it’s easy to do in any well-behaved application, such as Nisus Writer Pro, Safari, Mail, and even older applications like AppleWorks 6 and Microsoft Word X.
- Leopard setuid and passwd file changes
- Leopard Server introduced two major changes to two lesser-used features: setuid root script wrappers and BSD flat file authentication.
- Media duration in Python on Mac OS X
- It turns out to be very easy to get the duration of MP3 files, MPEGs, and other media files on the OS X command line.
- SilverService and Taskpaper
- SilverService is a great little app if you commonly need to repetitiously modify text. Any application that supports services will support running selected text through command-line scripts via SilverService.
- Seven more pages with the topic Mac OS X tricks, and other related pages
More PDF
- Calculating true three-fold PDF in Python
- Calculating a true three-fold PDF requires determining exactly where the folds should occur.
- Adding links to PDF in Python
- It is very easy to add links to PDF documents using reportlab or platypus in Python.
- Multiple column PDF generation in Python
- You can use ReportLab’s Platypus to generate multi-column PDFs in Snakelets, Django, or any Python app.
- Embedding Mako into Django
- You got Mako in my Django! You got Django on my Mako! Two great templates that template great together.
- Python PDF generation with Snakelets
- One of the things I need to do to move my current web site over to Django is be able to automatically generate PDF documents. Step is to learn how to generate PDF using Python.
- One more page with the topic PDF, and other related pages

Hey, this isn't working for me for some reason. I have no idea why. It saves the files as basically the same size (actually about .1 MB larger). I even tried to model exactly the existing "Reduce File Size" filter, and it still did it.
So, even though my filter and the existing filter have the exact same settings, the existing filter ("Reduce File Size") works and makes the pdf very small and has poor quality. But my filter makes the pdf file .1 MB larger.
Any suggestions?
Guest at 6:40 p.m. June 28th, 2009
br8UP
I'm pretty sure that the built-in Reduce File Size does more than just compress the images, but I don't know what. Whatever it is, there doesn't seem to be an automator plug-in for it.
As far as your resulting file being larger after compression than before, were the images already optimized when you put them in the document? That might result in further optimizations at a "higher quality" level spitting out larger images than the original.
I've found that custom reduce file sizes are most useful when I'm repositioning to the web documents that have very high quality images in the original.
capvideo at 4:26 a.m. June 29th, 2009
tVAhq
This worked perfectly for me. I saved a 6.5 MB file with the High Quality filter settings, and it reduced it to 2.2 MB. The image quality is MUCH better than the standard "Reduce File Size" settings, which rendered my document unreadable.
Thanks so much!
bizarrojune at 4:04 p.m. July 7th, 2009
rH3US
I found that the 'Image Sampling' filter actually made more of a difference to the file size...
Guest at 10:44 a.m. July 15th, 2009
De2tI
This was GREAT. The only thing which I am unable to do is Filter while Printing ... cannot find my created filter under coloursync ??
Guest at 9:29 a.m. August 19th, 2009
VTgK1
Open Document for PDF Conversion - or if in Web page, etc.... choose PRINT
Select PDF in lower left corner
Select Open PDF in Preview
Select File - Save As in Preview
Choose the Quartz Filter
For my filter I added Image Sampling Policy - set resolution to 150 Pixels Inch and changed quality to low
I also added Image Compression and set mode to JPEG and moved slider to LOW quality.
This resulted in a PDF that if fully readable and faxable..... and a drastic reduction in file size from over 20 Meg to 110 Kbytes. This is a great post.
Guest at 7:59 p.m. January 16th, 2010
UyPdc
Excellent, thanks for the tip. Went from 19MB to 5MB with no visible difference with the slider in 50%
Chester at 10:29 p.m. January 18th, 2010
cYrOI
Additional improvement..... use COLOR IMAGE SAMPLING at 40% before.. and then apply the image compression... the quality remains visibly the same, and your file size will go down aprox 90% !
Thanks for the great tip...
Alejandro Diego at 5:08 p.m. January 25th, 2010
a9iKK
Thanks for the tip! I did need to add the Color Image Sampling to get it to work for me, but then it worked well!
Derek at 7:32 p.m. August 23rd, 2010
tpVM4
I found that Color Image Sampling was the Key - JPEG and the slider alone under image compression did nothing for scanned files. It took an 8.3 MB file and made it a 1.2 MB file.
Here are the settings I put in for Color Image Sampling:
Scale: 85%
Resolution: left it blank
Max: 1026 Pixels
Min: 512 Pixels
Quality: High
Dotty at 5:18 p.m. September 24th, 2010
4b+Nv
+1 for adding a resample step, I put mine at 50% and then did a JPEG compression, went from a 36MB file to a 1.6MB file. Sweet tip!
Guest at 9:22 p.m. January 4th, 2011
Hkmfz
Worked for me - you're a star! I reduced a document form 165MB to 6.5MB with decent quality - I also used a bit of Image Down - Sampling. Couldn't have done it without you! Thanks!
Ana at 4:09 a.m. February 24th, 2011
CMTu/
that worked for me too, at 40% it's fine for a scanned pdf, went from 15 MB to 4MB
guest at 2:04 a.m. March 19th, 2011
oJsae
Thanks for the tip, I found the image sampling effect helped too, I duplicated the 'Reduce File Size' filter rather than creating a new one.
Guest at 10:59 a.m. March 24th, 2011
qIWzT
When I did this, all the pages in my PDF turned black and green.
Can you help me to know what i'm doing wrong?
Kieron at 12:41 p.m. March 25th, 2011
xfRwt
I see this occasionally when the PDF you’re compressing wasn’t created using Mac OS X’s built-in PDF creator, but rather Adobe’s or possibly Microsoft’s. If that’s the case—that you created the PDF elsewhere—then you might go back to the original application and see if it has compression options you can use.
If this was a PDF that you created using Mac OS X’s built-in “print to PDF” option, then I don’t know; I’ve never seen that happen.
capvideo at 8:29 p.m. March 27th, 2011
tVAhq
I was getting the black and green images too, and as capvideo says it was probably because the PDFs were created in Adobe. To get around this problem, in Colorsync create a new filter, right click on 'add color management component' and select 'convert to profile'. You'll be given a drop down menu and at the top is Adobe RGB. I opted to apply it to CYMK data to all objects (you'll see those options when you're doing it) and it worked for me. Reduced file size, with no image distortion.
Jack Gleeson at 9:59 a.m. April 16th, 2011
PH81z
I had the same problem. the file sizes kept getting bigger. I started at 2.2 MB and ended up at 13.4 MB
any suggestions?
thanks
Person at 11:37 p.m. April 19th, 2011
0JUNU
Yes. Don’t do that. If it’s already optimized I have noticed that sometimes Preview’s optimizer will end up increasing the size, sometimes drastically.
capvideo at 1:59 p.m. May 5th, 2011
tVAhq
Fantastic tip. I tried a few other options such as PDF shrink and I got nowhere. This helped me reduce the PDF size as well as keep the quality. I'll have to remember it for the future.
Dean Roskell at 4:53 p.m. June 27th, 2011
unneW
For some reason, the new entry is not showing in Quartz profile when i try to save from Preview.
This is on Lion and by the way, the Save as option is not there either. The only way i can get the anything close to that is if i use Export in preview.
Guest at 7:30 a.m. July 27th, 2011
BbWTH
This is awesome! Worked well for me. Compressed from 29.6MB to 4.7MB without much loss of quality. Thanks so much.
Anil at 6:09 p.m. October 11th, 2011
D/ti2
this was heaven sent!!! tanx! my PDF for a photography book was 600MB. Now it is 191MB. I spent two days downloading programs that would not work :/ tanx again...
vegan vampz at 12:17 a.m. October 29th, 2011
D4+yt
I have Lion and I ran into the same issue (it didn't appear in the Quartz Profile dropdown of Preview)
I found this thread: https://discussions.apple.com/thread/3196406?start=0&tstart=0
And these instructions worked for me:
Just copy your filter from:
/Users/YourName/Library/Filters/
to /Library/PDF Services/
and the customized profile will be back in preview.
Vinnie at 3:55 p.m. November 14th, 2011
i/CQk
Or you can 'move' it from one directory to the other (otherwise you'll see a copy in the ColorSync Util)
Vinnie at 3:57 p.m. November 14th, 2011
i/CQk
This worked great! I reduced my file size from 16MB to 2.7MB! Thanks!
Guest at 8:49 p.m. January 11th, 2012
XNHU/