How can I reduce PDF size automatically when importing?

BACKGROUND: I am not familiar with bash. And sometimes I need to clip webpage into DTP as a PDF file, but the file size is way too big, I also try using cmd+P to print as PDF, but still a little big size (I’m curious why file size print out of chrome.app is much bigger than safari.app did).

Now my solution is when put any PDF file into my INDEX folder, it will import into DTP right away, then I need to prompt a dialogue to give me an option to choose if need to reduce PDF size or not. If need, use below code to reduce file size(I don’t know how to pass filename, actually I don’t want to rename file, overwrite original one is ok):

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=reduced.pdf original.pdf

I realize Hazel can do that and I made the rule already, it works. But I don’t like to have another app in my computer memory long time just for only one task.

If anyone having other solution, I would appreciate it share with me.

On what basis would you decide you need to resize the file?

Also, Chome and Safari aren’t the same application so you shouldn’t expect the same results from each.

Because I saved all documents including web clipped PDFs in DTP, the smaller the better. Sometimes the file can be reduced even by 70%.

But what is the criteria on which you’d make such a decision? You clearly said…

then I need to prompt a dialogue to give me an option to choose if need to reduce PDF size or not.

There is a number of online tools which will compress your PDFs without charge.

Also software like this, that you could use prior to importing into DT. Good luck!

1 Like

Well, it depends on how important PDF is, I will choose compress or uncompress when import every time.