Better PDF File Size Reduction in OS X

Published 7 years, 11 months ago

One of the things you discover as a speaker and, especially, a conference organizer is this:  Keynote generates really frickin’ enormous PDFs.  Seriously.  Much like Miles O’Keefe, they’re huge.  We had one speaker last year whose lovingly crafted and beautifully designed 151-slide deck resulted in a 175MB PDF.

Now, hard drives and bandwidth may be cheap, but when you have four hundred plus attendees all trying to download the same 175MB PDF at the same time, the venue’s conference manager will drop by to find out what the bleeding eyestalks your attendees are doing and why it’s taking down the entire outbound pipe.  Not to mention the network will grind to a nearly complete halt.  Whatever you personally may think of net access at conferences, at this point, not providing net access is roughly akin to not providing functioning bathrooms.

So what’s the answer?  ShrinkIt is fine if the slides use lots of vectors and you’re running Snow Leopard.  If the slides use lots of bitmapped images, or you’re not on Snow Leopard, ShrinkIt can’t help you.

If the slides are image-heavy, then you can always load the PDF into Preview and then do a “Save As…” where you select the “Reduce File Size” Quartz filter.  That will indeed drastically shrink the file size—that 175MB PDF goes down to 13MB—but it can also make the slides look thoroughly awful.  That’s because the filter achieves its file size reduction by scaling all the images down by at least 50% and to no more than 512 pixels on a side, plus it uses aggressive JPEG compression.  So not only are the images infested with compression artifacts, they also tend to get that lovely up-scaling blur.  Bleah.

I Googled around a bit and found “Quality reduced file size in Mac OS X Preview” from early 2006.  There I discovered that anyone can create their own Quartz filters, which was the key I needed.  Thus armed with knowledge, I set about creating a filter that struck, in my estimation, a reasonable balance between image quality and file size reduction.  And I think I’ve found it.  That 175MB PDF gets taken down to 34MB with what I created.

If you’d like to experience this size reduction for yourself (and how’s that for an inversion of common spam tropes?) it’s pretty simple:

  1. Download and unzip Reduce File Size (75%).  Note that the “75%” relates to settings in the filter, not the amount of reduction you’ll get by using it.
  2. Drop the unzipped .qfilter file into ~/Library/Filters in Leopard/Snow Leopard or /Library/PDF Services in Lion.  (Apparently no ~ in Lion.)

Done.  The next time you need to reduce the size of a PDF, load it up in Preview, choose “Save As…”, and save it using the Quartz filter you just installed.

If you’re the hands-on type who’d rather set things up yourself, or you’re a paranoid type who doesn’t trust downloading zipped files from sites you don’t control (and I actually don’t blame you if you are), then you can manually create your own filter like so:

  1. Go to /Applications/Utilities and launch ColorSync Utility.
  2. Select the “Filters” icon in the application’s toolbar.
  3. Find the “Reduce File Size” filter and click on the little downward-arrow-in-gray-circle icon to the right.
  4. Choose “Duplicate Filter” in the menu.
  5. Use the twisty arrow to open the duplicated filter, then open each of “Image Sampling” and “Image Compression”.
  6. Under “Image Sampling”, set “Scale” to 75% and “Max” to 1280.
  7. Under “Image Compression”, move the arrow so it’s halfway between the rightmost marks.  You’ll have to eyeball it (unless you bust out xScope or a similar tool) but you should be able to get it fairly close to the halfway point.
  8. Rename the filter to whatever will help you remember its purpose.

As you can see from the values, the “75%” part of the filter’s name comes from the fact that two of the filter’s values are 75%.  In the original Reduce File Size filter, both are at 50%.  The maximum size of images in my version is also quite a bit bigger than the original’s—1280 versus 512—which means that the file size reductions won’t be the same as the original.

Of course, you now have the knowledge needed to fiddle with the filter to create your own optimal balance of quality and compression, whether you downloaded and installed the zip or set it up manually—either way, ColorSync Utility has what you need.  If anyone comes up with an even better combination of values, I’d love to hear about it in the comments.  In the meantime, share and enjoy!


Update 2 Aug 11: apparently there have been changes in Lion—here’s an Apple forum discussion of the problem.  There are two workarounds described in the thread: either to open and save files with ColorSync Utility itself, or to copy the filter to another folder in your Library (or install it there in the first place, above).

Update 27 Mar 12: edited the Lion install directory to remove an errant ~ .  Thanks to Brian Christiansen for catching the error!

  1. Awesome. This will come in handy for sure.

  2. I love it!

  3. *151* slides? That’s worthy of a health and safety inspection halfway through.

    Nice trick though, that should come in handy someday.


  4. This is a great way to reduce the file size of a PDF. Especially when dealing with a huge pdf a customer wants to be downloaded from their website. Download speeds is quite a big issue, so reducing the file size by any amount is of great help!

  5. Excellent! I was just trying out ShrinkIt and remembered your post. This did exactly what I needed it to do!

  6. This doesn’t reduce my file size even a little bit. I have tried several ways that are claimed to reduce the pdf but no go so far.
    I even tried to save the pdf as black and white, but it still is the same sime.
    The pdf are pages from a book, if that helps identify the problem.


  7. […] Better PDF File Size Reduction in OS X: "I discovered that anyone can create their own Quartz filters, which was the key I needed. Thus armed with knowledge, I set about creating a filter that struck, in my estimation, a reasonable balance between image quality and file size reduction. And I think I've found it. That 175MB PDF gets taken down to 34MB with what I created. If you'd like to experience this size reduction for yourself (and how's that for an inversion of common spam tropes?) it's pretty simple." […]

  8. Since Eric Meyer is a HTML/CSS god, I think that he forgot one thing — while the internet doesn’t support jpeg2000, pdf does support jpeg2000.

    You can achieve both file size reduction and maintain the quality of the photographs in the pdf file at the same time.

  9. Thank you very much! It would be such a time-saviour if I had your filter at hand while working on my project. Having to digitalize almost the whole library catalogue’s topic on modern Russian literature I had to painfully exepriment with filters myself. Yours working more efficient I must admit!

    – From a huge fan of your CSS Books =)

  10. How about a distributed solution for download, like BitTorrent? :-)

  11. Janet: not “forgot one thing” so much as “didn’t know that thing in the first place”, but how does that apply? Keynote exports what it exports; my goal was to shrink what it exported to something more manageable. I don’t see how PDF’s support of jpeg2000 relates, exactly.

    Pål: all that data still has to get stuffed through the same incoming pipe, so from what I can tell BitTorrent wouldn’t help, or might actually make things slightly worse. This isn’t about server resources, but available bandwidth at the endpoint (the venue). And also about making files smaller in general.

  12. I believe that Keynote supports all the graphics/video formats that QuickTime supports — and QuickTime supports jpeg2000.

    So if your original Keynote presentation started off with jpeg2000 graphics files in the first place, then the original Keynote presentation would be a lot smaller from the start.

    And when you export your Keynote presentation into the pdf format, you will export those smaller sized jpeg2000 files into the pdf.

  13. True, though sharing internally on the network would work without trusting the initial external seeder too much, once someone “inside” gets the file and is willing to share.

    I’ll stop here though :-)

  14. Janet: ah, I see. If that’s the case, then that would be awesome as long as all the presenters use jpeg2000 from the outset, but they don’t.

    It would be interesting to see if the filter I created reduced such files still further or if the initial space savings of using jpeg2000 would leave little room for improvement. I’ll have to see if I can find time for some experiments along those lines.

  15. Great technique.
    Mind if I steal it for my conferences?

    PS – good luck in Seattle!

  16. Barbara—heck no! Use it however you like. Just let me know if you find a better combination of settings so I can use them. And thanks!

  17. thx for teaching me to fish in a few easy lessons! 1st test of my filter [ per your directions ] 380k > 28k for an illustrator pdf legal size proposal. no images. no obvious reduction in quality. unreal. now off for some more tests!

  18. Great tutorial! Just what I needed to reduce pdf files for downloads. With one reduction reduced 5.9MB to 592KB. Used the second (manual) technique, and the pictures have no noticeable quality reduction. Thanks so much!

  19. […] or otherwise) that you need to shrink to email to colleagues you should wander over to this blog.  He has a nice Quartz filter you can download that allows you to open PDFs (particularly […]

  20. […] Eric's Archived Thoughts: Better PDF File Size Reduction in OS X (tags: osx pdf tools tips howto keynote) […]

  21. Wow! This worked perfectly! I was able to go from a 14 MB pdf to a very readable 492 KB pdf in no time.

    The only thing I can’t seem to do is change the name of the quartz filter. No big deal – I just have to remember that the name is File Reduction Size Copy.

    Thanks so much – this is one of the few online pieces of advice that actually worked for me!

  22. This was incredibly useful thank you so much for this. I had the choice of a 80Mb good quality or 568Kb awful one before.

    Now I have have a 7Mb happy medium!

  23. Worked brilliant!

    I reduced a 5.5MB file down to just over 700K, without any real visual difference!


  24. Awesome. You rock my pdf world.

  25. Dude…

    I love you…

    You made my scholarship application possible, ShrinkIt, PDF Shrink and all those worthless tools didn’t make the trick…


  26. Awesome advice! Thank you so much for sharing. The built in filter turned my 960MB PDF with great image quality into 770KB with crap for images and a poor reflection on a professional photog. Now I have a 2.8MB PDF that still has good images.

  27. Love it, worked well in Snow Leopard. But couldn’t get it working in Lion. Please advise.

  28. John, it turns out there’s a known problem in Lion—here’s an Apple forum discussion with advice on workarounds. I’ll update the post to reflect this. Thanks for the heads-up!

  29. Eric, thanks for the fabulous tip. It works great. I have a quick question for you — I recreated it per your instructions, but how do you export the .qfilter file for a new filter? I haven’t been able to figure that out at all.

  30. Awesome, I was googling around and trying a number of things but this is perfect, especially for scanned txt as the default filter turns it to garbage!


  31. Thank you!!!!! I tried everything else, all terrible quality for the text PDF. Great advice– setting parameters for the image *and* changing the compression settings.

  32. Great tip: Works perfectly!

    If you do cannot find a Filters folder in your Library folder, just go to (Your Computer) -> Users -> (Your User Name) -> Library, create a new folder and name it Filters, and then copy “Reduce File Size (75%).qfilter” into your new folder.

    This worked successfully for me in OSX 10.5.8.


  33. Excellent! Worked amazingly well. The original reduce size filter destroyed scanned documents I was trying to send. I adjusted the filters as you described and I swear, the docs look better and are less than half the original size. Nice! Thanks for passing this on!

  34. Awesome help for reducing PDF magazine sizes to fit on iPad, thanks very much!!!!

  35. Thank you, Internet Citizen. I’ve been having a lot of trouble with Prezi PDFs having huge sizes and the regular file size filter was destroying my images.

  36. Soooo helpful ! On my Macbook air I decided NOT to install the CS Suite and rely only on iWork and native apps. That left me with HUGE pdfs generated from Keynote and Pages when images were imbedded. This solution is brillant. Thanks.

  37. Didn’t work for me. Actually increased file size of a PDF’ed Powerpoint by another 3Mb.

  38. Thanks so much! I had a 4MB paper to turn in for class (with lots of detailed images) but it had to be less than 2MB when submitted. I created my own filter (just as you described) and it worked perfectly. My 4MB file was compressed to just 525KB and the images were still very clear.

  39. Hey thanks, works really well.

    I even applied it twice on each reduced version to get a 10% reduction in file size from the original with a readable image.

    I tried a shareware app that does the same thing and it took about 4 -5 minutes while direct from preview took under 1 min.

  40. […] OLD OS, but it doesn’t work under the new one.  Poo. So of course I had to Google and found this handy post.  Took seconds and worked like a charm! It took the nearly 40 mb PDF and reduced it to […]

  41. if you want to create your own filter, it is very easy, check this tutorial (not mine, just used it):

  42. Thanks for putting this up – it’s exactly what was needed! I use JotNot on the iPhone to capture receipts for expense reports, but the files are huge. JotNot + this filter are making my life much easier.

  43. Sadly it won’t work for me… I tend to make keynote presentations with a lot of vector graphics, gradients, transparency, that kind of thing, but not many bitmaps. It’s funny, you would think vector graphics would be relatively small, but maybe the gradients kill them. Any ideas for somebody like me? ShrinkIt is unfortunately not useful either.

  44. Wow! thank you!!!

    this is super useful, I can not wait to share with all fellows photographers :-)

  45. Fantastic, thanks! I added the ‘Filter’ folder into library as suggested by Pico and it worked perfectly on 10.6.8


  46. Thank you! A fantastic, yet little-known trick.

    This was the ONLY way I could find to get my 100MB PDF down to an e-mailable size. Much obliged to you.

  47. This worked perfectly for me on Mountain Lion. Just placed the unzipped filter in ‘/Library/PDF Services’ and it was available in Preview.

    For me the balance between filesize and quality is much better than Apple’s version, which was far too agressive.

  48. Thanks! Especially useful for scanned text. — Working in OS X 10.8.4 on a Retina MBP!

  49. Hm… why won’t it actually reduce the file size?
    It is available to me (Mountain Lion) under “Print” and then “Pdf”, but the file size is not different….

  50. quick question, is the vector graphics quality retained this way?

  51. I export my pdf in preview to reduce the file size and the new saved file size is exactly the same size as the original? please help, I’m desperate.

  52. thanks! worked in preview on OSX 10.9.4 MBA 1.7 Corei5

  53. Thanks! Worked wonderfully.

    Using Lion on Black MacBook!

  54. 686mb to 16mb, on Maverick. you rock sir, thank you very much!!

  55. Your file size reduction filter worked beautifully. Just what I was looking for! Thank you very much!!

  56. Thank you thank you! went in and reset the numbers and it worked perfectly! Gmail wont let you send files larger than 25mb so this comes in handy

  57. Please,
    any suggestion for Yosemite?

  58. Thank you – this has been so helpful and I appreciate you for posting it here for the rest of us!

  59. I tried this in Yosemite and it took a 62.5mb file and “shrunk” it to 402.1mb…… Ha?

  60. Perfectly filtered with Mavericks 10.9.2! Thanks a lot

  61. […] Then, I increased ‘Max Pixels’ from 512 to 1280. (I borrowed these setting suggestions from […]

  62. +1
    Worked perfectly with Yosemite 10.10.5.

  63. In my case, using OS X 10.11.6 I had to disable System Integrity Protection in order to copy filters to /system/library/filters folder. After doing that the new filter showed up in Preview.

    The “reduced” file was bigger than the original (8mb to 8.8mb), so I went back in and reduced the max pixel size from 1028 back to 512 and changed the Image Compression arrow to be around 65%. This resulted in a 1.1mb file.

    Also, to disable (and later re-enable) SIP, follow these instructions:

    Hope this helps

  64. This was so helpful for me when I was creating my (image-heavy) portfolio! Thank you so much for a simple and elegant solution! You’re the best!

Leave a Comment

Management reserves the right to edit or remove any comment, especially when abusive or irrelevant to the topic at hand. HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <em> <i> <q cite=""> <s> <strong> <pre class=""> <kbd>

Comment Preview

If you're satisfied with what you've written, then go ahead...