Hacker News new | past | comments | ask | show | jobs | submit login

Yes, its mainly to reduce image size for scanned documents. I'll give Ghostscript a try.



Something like this is probably a good starting point:

    ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
From this gist https://gist.github.com/guifromrio/6390547#


Very helpful tip. Thank you! - Ran it through GS and I got 30% reduction in a 50mb pdf file. I think if I play around with some options - such as converting images to grayscale, I might be able to reduce it by another 10-20%.


I guess it depends on your document, but I'm surprised you only get that much compression. For scanned to pdf documents I often get orders of magnitude.

I'm not at my computer, but try messing with the `/printer` in the above command, there are other options, (possibly `/ebook`?) that control the compression ratio from memory.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: