by bArray · 7y ago · 0 comments
ps2pdf LARGE.pdf SMALL.pdf
I believe it compresses all of the images independently, instead of converting the entire thing to an image as I believe Imagick does (I could be wrong though). This tool doesn't appear to have any intelligent auto-deskewing though. (On a slightly different note, it's questionable whether you want to do this for archiving as it'll undoubtedly be a lossy operation.)The reason I use this: Many websites for conferences have upload limits at around 10MB, a size you can easily reach with a handful of images from a modern device in your paper.
[1] https://www.shellhacks.com/linux-compress-pdf-reduce-pdf-siz...
ps2pdf does work on Windows though (or maybe it's pstopdf?), and the Linux version works directly in WSL.
As the PS format was designed for printing [2], my guess is that it selects a DPI value suitable for printing. I can't seem to find the source code to back this up though. (Ghostscript has the simple web front-end that doesn't lend itself very well for viewing code in browser [3].)
[1] https://www.biu.ac.il/os_site/documentation/gs/Ps2pdf.htm