5 ms·
Any recommendations for a desktop/cli PDF optimization tool that will reduce the size of a pdf? I've tried few and the best one so far is the one that is inclu
by nirav72 3y ago
Any recommendations for a desktop/cli PDF optimization tool that will reduce the size of a pdf? I've tried few and the best one so far is the one that is included in the subscription version of Adobe Acrobat. But I only need it occasionally and is not worth paying $20/month sub.
- niutech 3y agoCheck out FileOptimizer (https://nikkhokkho.sourceforge.io/static.php?page=FileOptimizer https://nikkhokkho.sourceforge.io/static.php?page=FileOptimi...)
- aidos 3y agoGhostscript maybe? Depends on what you’re doing but it can downsample images etc.
- nirav72 3y agoYes, its mainly to reduce image size for scanned documents. I'll give Ghostscript a try.
- aidos 3y agoSomething 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# https://gist.github.com/guifromrio/6390547#
- nirav72 3y agoVery 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%.
- mijoharas 3y agoI 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.
- evrflx 3y agoDid you already give ghostscript a try?
- deleted 3y ago[deleted]
- mpweiher 3y agoIf you're on a Mac, (my) PdfCompress is fairly smart about doing a good job. Haven't updated it in while though... :-/
- senjin 3y agoI recently found out Mac's built in Preview app can do this. Go to export then change the Quartz Filter to "Reduce File Size"