Wednesday, November 07, 2012

Mac OS X Preview reduce PDF size

Problem:

I have some (scanned) PDF documents which is a bit large (in a few MB) and want to reduce their size. The Preview app in Mas OS X has the function to reduce the PDF size but the resulted output is not clear enough to be useful.

To reduce PDF size in this way, we first open the PDF file in Preview. The select "File" -> "Export...". In the "Quartz Filter" option, select "Reduce File Size" and then "Save" the file with a new name. In one example, a 1.4MB colour scanned file is reduced to 65KB but the text is hardly readable.


Configuration:

Mac OS X 10.8.2


Solution: 

Open the "ColorSync Utility" from the "Applications" -> "Utilities" folder. On the lower left corner, click the "+" icon to add a new filter. You can name it as "PDF downsize".

Select this new filter and click the down arrow icon on the right. Select "Add Image Effects Component" -> "Color Image Sampling". In the newly created "Image Sampling" component, set the followings:

Scale : 100%
Resolution : <empty> Pixels / inch
Max : 1684 Pixels
Min : 512 Pixels
Quality : High

Click the down arrow icon again, this time, select "Add Image Effects Component" -> "Image Compression". In the newly created "Image Compression" component, set the followings:

Mode : JPEG
Quality : slide to around 25% towards Min

After these modifications, the "ColorSync Utility" can be closed.

Finally, open a terminal window (by "Applications" -> "Utilities" -> "Terminal". Then run the following command. Enter you root password if asked.

sudo mv ~/Library/Filters/PDF\ downsize.qfilter  /Library/PDF\ Services/

Now, you can select the "PDF downsize" filter in Preview and the above mentioned example is reduced from 1.4MB to 353KB with very readable result.

No comments: