Better PDF File Size Reduction in OS X

In: web resources

25 Feb 2010

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.

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. Find the “Reduce File Size” filter and click on the little downward-arrow-in-gray-circle icon to the right.
  3. Choose “Duplicate Filter” in the menu.
  4. Use the twisty arrow to open the duplicated filter, then open each of “Image Sampling” and “Image Compression”.
  5. Under “Image Sampling”, set “Scale” to 75% and “Max” to 1280.
  6. 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.
  7. 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!

Go to Source

5 Responses to Better PDF File Size Reduction in OS X

Avatar

master_editor22

March 8th, 2010 at 7:49 pm

try to upgrade your RAM

Avatar

SilverTonguedDevil

March 10th, 2010 at 8:07 pm

Did you go the next step and get some company to host the domain? That means they provide drive space and other services, and are online 24x7x365. If you want to self-host, download and read the Network Services Admin guide from Apple at the last link below.

After arranging the hosting, your domain is on some other computer, not on your OS X server. Using FTP is the same in both OS X client and OS X Server. First, you should make some Web pages. Theoretically, this is for organization, as someone can still see your photos one by one as long as they know the URL (such as
/Eiffel_Tower.jpg"). But most people will appreciate a page of thumbnails that link to the individual full-size photos. There are lots of guides online for creating simple Websites. Typically, the home page must be named "index.html".

Several ways:
1) Go to the top menu bar, and click "Go" > "Connect to server". Type the server address.

To connect to an FTP server as an anonymous user (if permitted), type the DNS name or IP address for the server like this:

ftp://DNSname

You can also specify your user name using this form:

If you use this form, a dialog appears for you to enter your password. You can specify both your user name and password using this form:

2) Use the Web page provided by your hosting company. Every hosting company provides some sort of "control panel" page for uploading files. Go to their home page and start navigating to the Help or "User guide" pages.

3) Use an online FTP service, such as the one at the first link below.

4) Download a free FTP application, such as the one at the second link below.

To edit Web pages, use TextEdit if you know HTML code or Kompozer, third link below, if you want a WYSIWYG editor.

Avatar

pondlady

March 19th, 2010 at 12:50 pm

He's feeding you a line. Tell him you want your money back. A warehouse isn't going to change parts in a pump. He's scamming you.

Avatar

Nash

March 20th, 2010 at 2:45 pm

If you want quality, always use 2 pass. You always get more bang for your buck (bandwidth) with 2 pass encoding.

Otherwise, h.264 (which is just like mpeg4, I thuink) at the 2mbps should look pretty good.

Oh, btw, standard def video at 720×480 isn't square pixels. It would be 640×480 if your want to use square pixels. But if the finished video is not for PC playback exclusively, I would keep it 720×480 without square pixel selected.

Avatar

groover1_1999

March 27th, 2010 at 6:56 pm

I have used the Pentax S4, S5i and S6. They are small enough to fit inside an Altoids tin. They take amazing photos. the number is the Megapixels. The most recent version is the A10 (link below), though I have not used this version yet. It's 8MP. There is also a 6MP that's slightly larger and that's the T10 which has a touch screen on the back. Looks nice, but I haven't used that one yet either. That link is below as well as the S6. Have fun. Oh, the A10 is slightly bigger than the other cameras, but only slightly.

Comment Form

About this blog

This blog delivers stylish and dynamic news for designers and web-developers on all subjects of design, ranging from: CSS, Ajax, Javascript, web design, graphics, typography, advertising & much more. Our goal is to help you communicate effectively on the web with an engaging website or functional interface.