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.