meyerweb.com

Skip to: site navigation/presentation
Skip to: Thoughts From Eric

Better PDF File Size Reduction in OS X

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!

Translations

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!

53 Responses»

    • #1
    • Comment
    • Thu 25 Feb 2010
    • 1321
    Rob L. wrote in to say...

    Awesome. This will come in handy for sure.

    • #2
    • Comment
    • Thu 25 Feb 2010
    • 1441
    Richard Bronosky wrote in to say...

    I love it!

    • #3
    • Comment
    • Thu 25 Feb 2010
    • 1759
    Andreas Sikkema wrote in to say...

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

    Nice trick though, that should come in handy someday.


    Andreas

    • #4
    • Comment
    • Fri 26 Feb 2010
    • 0357
    Daniel Long wrote in to say...

    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
    • Comment
    • Fri 5 Mar 2010
    • 0929
    Joe Fritz wrote in to say...

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

    • #6
    • Comment
    • Sat 6 Mar 2010
    • 1836
    brick wrote in to say...

    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.

    thanks

    • #7
    • Pingback
    • Thu 11 Mar 2010
    • 1804
    Received from Links for February 24th through March 11th – eclecticism

    [...] 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
    • Comment
    • Tue 16 Mar 2010
    • 1616
    Janet wrote in to say...

    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
    • Comment
    • Wed 17 Mar 2010
    • 1120
    Andrey Esaulov wrote in to say...

    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
    • Comment
    • Thu 18 Mar 2010
    • 1259
    Pål Eivind Nes wrote in to say...

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

    • #11
    • Comment
    • Thu 18 Mar 2010
    • 1308
    Eric Meyer wrote in to say...

    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
    • Comment
    • Thu 18 Mar 2010
    • 1646
    Janet wrote in to say...

    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
    • Comment
    • Thu 18 Mar 2010
    • 1656
    Pål Eivind Nes wrote in to say...

    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
    • Comment
    • Thu 18 Mar 2010
    • 2027
    Eric Meyer wrote in to say...

    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
    • Comment
    • Fri 2 Apr 2010
    • 1233
    Barbara Gavin wrote in to say...

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

    PS – good luck in Seattle!

    • #16
    • Comment
    • Fri 2 Apr 2010
    • 1613
    Eric Meyer wrote in to say...

    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
    • Comment
    • Wed 7 Apr 2010
    • 0956
    bob asbille wrote in to say...

    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
    • Comment
    • Mon 12 Apr 2010
    • 1317
    Ina wrote in to say...

    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
    • Pingback
    • Thu 22 Apr 2010
    • 1057
    Received from fizzix » PDF File Size in OS X

    [...] 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
    • Pingback
    • Thu 22 Apr 2010
    • 2040
    Received from John From Berkeley » links for 2010-04-22

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

    • #21
    • Comment
    • Fri 27 Aug 2010
    • 2013
    kb wrote in to say...

    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
    • Comment
    • Tue 30 Nov 2010
    • 1214
    HJ wrote in to say...

    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
    • Comment
    • Tue 25 Jan 2011
    • 1108
    Richard Stewart wrote in to say...

    Worked brilliant!

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

    Thanks!!

    • #24
    • Comment
    • Thu 3 Feb 2011
    • 2058
    Gordon wrote in to say...

    Awesome. You rock my pdf world.

    • #25
    • Comment
    • Sat 16 Jul 2011
    • 2214
    Guillermo Velasquez wrote in to say...

    Dude…

    I love you…

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

    Thanks!

    • #26
    • Comment
    • Sun 24 Jul 2011
    • 2021
    Wallace Weeks wrote in to say...

    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
    • Comment
    • Tue 2 Aug 2011
    • 1350
    John McDonald wrote in to say...

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

    • #28
    • Comment
    • Tue 2 Aug 2011
    • 1701
    Eric Meyer wrote in to say...

    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
    • Comment
    • Tue 16 Aug 2011
    • 0822
    Geoff Green wrote in to say...

    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
    • Comment
    • Wed 31 Aug 2011
    • 0531
    Chris wrote in to say...

    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!

    +1

    • #31
    • Comment
    • Wed 28 Sep 2011
    • 2233
    an wrote in to say...

    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
    • Comment
    • Tue 18 Oct 2011
    • 1328
    Pico wrote in to say...

    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.

    Thanks!

    • #33
    • Comment
    • Sat 10 Mar 2012
    • 2020
    Todd wrote in to say...

    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
    • Comment
    • Fri 16 Mar 2012
    • 1736
    Sentry wrote in to say...

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

    • #35
    • Comment
    • Thu 29 Mar 2012
    • 1327
    Kyle wrote in to say...

    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
    • Comment
    • Sat 31 Mar 2012
    • 0742
    William wrote in to say...

    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
    • Comment
    • Wed 11 Apr 2012
    • 0532
    Jonathan wrote in to say...

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

    • #38
    • Comment
    • Sun 29 Apr 2012
    • 2137
    Jenny wrote in to say...

    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
    • Comment
    • Fri 4 May 2012
    • 0904
    Maurice wrote in to say...

    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
    • Pingback
    • Fri 24 Aug 2012
    • 0238
    Received from An old class | Scrappy Sticky Inky Mess

    [...] 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
    • Comment
    • Mon 24 Sep 2012
    • 0622
    Flo wrote in to say...

    if you want to create your own filter, it is very easy, check this tutorial (not mine, just used it):
    http://grannyjoans.blogspot.ch/2012/09/reducing-size-of-pdfs-in-mountain-lion.html

    • #42
    • Comment
    • Thu 15 Nov 2012
    • 1017
    Sol Young wrote in to say...

    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
    • Comment
    • Mon 4 Feb 2013
    • 1727
    Jeff wrote in to say...

    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
    • Comment
    • Mon 8 Apr 2013
    • 0710
    Francesca wrote in to say...

    Wow! thank you!!!

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

    • #45
    • Comment
    • Thu 11 Apr 2013
    • 0915
    Colin Seymour wrote in to say...

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

    Lifesaver!

    • #46
    • Comment
    • Wed 5 Jun 2013
    • 1909
    Andrew wrote in to say...

    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
    • Comment
    • Mon 2 Sep 2013
    • 1725
    Martijn wrote in to say...

    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
    • Comment
    • Tue 15 Oct 2013
    • 1011
    Eddie wrote in to say...

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

    • #49
    • Comment
    • Fri 17 Jan 2014
    • 0620
    Iris wrote in to say...

    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
    • Comment
    • Tue 4 Feb 2014
    • 1005
    Panos wrote in to say...

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

    • #51
    • Comment
    • Wed 26 Feb 2014
    • 0356
    Anica wrote in to say...

    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
    • Comment
    • Tue 15 Jul 2014
    • 0706
    Nick wrote in to say...

    thanks! worked in preview on OSX 10.9.4 MBA 1.7 Corei5

    • #53
    • Comment
    • Thu 17 Jul 2014
    • 1533
    Jimmy Montano wrote in to say...

    Thanks! Worked wonderfully.

    Using Lion on Black MacBook!

Leave a Comment

Line and paragraph breaks automatic, e-mail address required but never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Remember to encode character entities if you're posting markup examples! Management reserves the right to edit or remove any comment—especially those that are abusive, irrelevant to the topic at hand, or made by anonymous posters—although honestly, most edits are a matter of fixing mangled markup. Thus the note about encoding your entities. If you're satisfied with what you've written, then go ahead...


February 2010
SMTWTFS
January April
 123456
78910111213
14151617181920
21222324252627
28  

Sidestep

Feeds

Extras