I often end up having PDF documents that are too large to send anywhere -- be it because I actively just don't want to send that 3 mb 2 page PDF or that the receiving system won't accept larger files than 2 mb (when sending in taxes receits for example).
The reason for those large PDFs often is, that a text based document got scanned in as a picture, so that the PDF document really consists of one large jpeg image per side.
Now, the macOS Preview application has had so called
Quartz Filters for ages, one of which is called
Reduce File Size-- sounds promissing, doesn't it? Problem is, this filter is reducing those images so massively, that text will end up in a blur and something that you don't want to send neither...
When working with Apple Preview, you can get to the filters by
Exportfrom the Menu Bar
Reduce File Sizethere
The nice thing abount these filters is: they are just plist / xml files, and when you know what property to change, you can actually tweak the filter to produce the results that you like to have.
First of all, you need to know where those filters are located: you will find them in
/System/Library/Filters. A good starting point obviously is just to copy one of those filters and tweak that copy. Copying into the same folder did work until macOS 10.11, but starting with macOS 10.12, neither the administrator nor the superuser have writing access to
So, this seems to be a dead end -- but is it really?
No, it is not. There are several levels of Libraries being considered by Preview for
So, the easiest solution in my point of view is to copy the filter into the user's home folder. As there is no
Filters folder in the home library though, one needs to create that manually first:
After that we can copy the filter -- I am taking the
Reduce File Size filter for that:
cp /System/Library/Filters/Reduce\ File\ Size.qfilter ~/Library/Filters
The plist / xml property to change is found here:
The default value for this filter is
512 - changing this to
2048 will result in much better, yet still small enough PDF files. So, after changing the value, saving the file and restarting Preview, the new Filter will be available.
One thing to note though is, that now we have two entries of
Reduce File Size in the
Filter area of above described Export Dialogue. This is because the name of the filter displayed there is saved to the
.qfilter-file as well, so renaming the file only won't be suffice. To do that, change the following plist / xml property:
<key>Name</key> <string>Reduce File Size</string>
I chose to change that value to
Reduce File Size - Better. Now, I can choose this filter to get a better, yet reduced PDF file, that still has a good enough quality.
I showed you a solution to copy and alter an existing
Quartz Filter to be able to reduce PDF file sizes in a way that those PDFs are still readable by copying one of the existing filters and changing a few of its values.