Thanks. I should have been more careful in what I said. I have lots of presentations, created in Powerpoint, and exported to pdf. These have lots of text, but also lots of images that take up a significant piece of a page. Many of those pdf files do not benefit, size-wise, from this Preview quartz filter strategy. Not sure what the original pixel dimensions of these images were, so yes, that might just be the reason, I guess, in that if they were already 150 dpi, and properly sized, using a 150 dpi filter wouldn't help. If they had a lower resolution, a 150 dpi filter setting might actually make the files larger, which I sometimes see happen.
Of course, once they are in pdf, I can't tell what the resolution settings were that they had when they were placed. Can I?
As so many other have said in this thread, a sincere thank you to Jerome. Working perfectly for me in Mountain Lion. I've been trying to figure this out for so long. Wouldn't it be great if Pages 'reduce file size' functioned like this instead of reducing images, logos, etc in so many documents to bleary mush?!
Hi, I am in desperate need of the capability of converting a scanned file to a smaller PDF. Limited on time. I tried going to your orginal post and select the link and keep getting a HTTP error. I am also new to using an apple computer, can you please help ASAP, in obtaining the information to convert a file. Here is the error message I get every time I select the original post link. "Http/1.1 Service Unavailable ".
I found a current location for the files on p.12 of this post, and downloaded with success (thank you Jerome!! - your original post from years ago is still helping lots of people!).
Here's the link:
I am not sure if this is related to OS X 10.8 and I have no way to check, since all my Macs are running 10.8.2.
I remember the filters being increaisng the size for some converidsions (as reported by some in thi discusiion) but never had any particular problem sinc OS X Mountain Lion.
However, yesterday (after seing your post :-) I exported a 1.8 MB file (that was the concatenation of a scanned page and 5 other pages from an already file-size-reduced PDF) using the "standard compression" and had a 8.2 MB as a result.
Even stranger, exporting the 8.2 MB file using the same standard settings resulted in a 2.7 MB file !
And those results were consistent after reboot and several retries.
But everything still works fine with a nice file size reduction for other files.
I guess this is an OS X bug : the filters themselves are very simple Colorsync filters (you should be able to see them in Colorsync Utility) which apply 3 Apple-provided filters for image sampling (1 filter for color ; 1 filter for B&W) and 1 filter for jpeg compression.
However I am not an expert and have not found an easy way to analyze the PDF files and check for image resolution or jpeg compression.
(I am an Adobe CS6 subscriber but did not find anything useful for that in Acrobat Pro)
So if anyone knew of a tool to check for the properties of objects in a PDF, preferably working on Macs, that would be great!.
There are actually (very well hidden) PDF analyzing features in Acrobat Pro.
So I now have a solution for larger than the original result files, that you have reported (and other users of these filters have reported too) later in that post.
But first the cause for these two large files: for some (unknown by me) reason, the images within the target files are not JPEG-compressed.
It looks like a bug to me, so I am going to file a bug report with Apple right away.
And here is the solution: re-export the target file with a filter only enabling JPEG-compression for images within the PDF.
Here is this filter: Click here to download.
It is the same as the standard compression filter "Reduce to 150 dpi average quality - STANDARD COMPRESSION" but without the dpi settings and seems to work well for me.
Just put it next to the other filters in "Macintosh HD/Library/PDF Services" if your startup disk is called "Macintosh HD" and choose it in preview when re-exporting to PDF the too large files produced by the previous pass.
Yiannis, does this work for you?
Hmmm. I tried your "JPEG compression - STANDARD.qfilter" filter, and it turned a 762K journal article pdf file (mostly text, but with a few B&W figures), into a 4.7Mb file. No joy. The built-in 150dpi STANDARD COMPRESSION filter turns it into a 913K file.
If you run that standard filter on the output of the new filter, you end up with 1MB.
What no one seems to have ever tried to explain is WHY these filters sometimes result in larger files. As a result, the success of any particular filter no doubt depends on what's in the file to begin with.
Those filters only care for images. They have no interest for PDFs which are mostly text; And in the case of an optimized PDF they will not help.
But they will help for (most of) the non compressed PDFs produced by OS X's printing or scanning.
As to the WHY, I cared a lot about it and if you re-read my last post, it is because JPEG compression is not applied although it should.
Thanks. But this file I compressed DID have some images. In fact, although this filter might have no interest in a pdf with mostly text, it was interested enough in mine to bump the size up by a factor of six. You'd think that if there were nothing compressable, it would just leave the size the same.
If the jpeg compression is not applied when it should be, how do you turn a mostly text pdf into something a factor of 6 bigger?
Sorry, but that WHY didn't quite fit the bill.
If you're interested in knowing why (small caps are nicer :-) a PDF export from Preview can produce a bigger file than the orginal, you are probably not at the right place.
However, to give you a flew clues, you can certainly easily understand that OS X's handling of PDF hasnot been optimized for file size optimization only (for example, speed is of the essence). And it seems that PDF export by Preview are not "pass through" exports, especially when you apply filters. During the export, Preview undoes previous optimizations and applies its own, possibly not as efficient from a file size standpoint.
This discussion as about an easy way to reduce the size of user created PDFs (through printing or scanning especially) without needing expensive or unintuitive tools like Acrobat Pro, which was not even available on Leopard when this discussion started.
And the "why" we wanted to understand is why these filters failed miserably in some cases although they work well most of the times.
Luckily, I think we have an answer, and, better yet, a solution :-)
Hope I could help a bit
OK, well, let me understand. You posted a filter that I assumed was intended to be used with Preview to reduce a pdf file size. On the first pdf file I tried it on, it did exactly the opposite. I didn't create that file, and it was likely created with Acrobat Pro.
Now, if you're saying that it works only in user-created pdf files. OK, so I tried it out on a document I scanned last night. Half of that document is a form with text, and the other half a gray scale picture. The original document (from VueScan) was 61K. After running it through your filter, I get 348K. Again, no joy (and again, perhaps coincidentally, a factor of six!)
So maybe I'm just not understanding exactly what files this filter is supposed to work on?
If the discussion was about an easy way to reduce the size of user-created pdfs, this didn't work for me.
I appreciate the suggestion, and I'm glad it worked for you, but it's evidently not an answer for everyone.