3 ms·
It sounds like you are using Windows, but if you happen to be using Linux [1]: ps2pdf LARGE.pdf SMALL.pdf I believe it compresses all of the images indepe
by bArray 7y ago
It sounds like you are using Windows, but if you happen to be using Linux [1]:
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-size/ https://www.shellhacks.com/linux-compress-pdf-reduce-pdf-siz...
- mkl 7y agoI think this won't be useful for scanned documents, as the entire page will be one image. ps2pdf does work on Windows though (or maybe it's pstopdf?), and the Linux version works directly in WSL.
- bArray 7y agoI believe `ps2pdf` is just a front end script for Ghostscript. Even for `ps2pdf` there are a bunch of options settable, most notably are the DPI settings [1]. The point is that I believe it works for images and/or scalar graphics. 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 https://www.biu.ac.il/os_site/documentation/gs/Ps2pdf.htm [2] https://en.wikipedia.org/wiki/PostScript https://en.wikipedia.org/wiki/PostScript [3] http://git.ghostscript.com/?p=ghostpdl.git;a=summary http://git.ghostscript.com/?p=ghostpdl.git;a=summary
- mkl 7y agoIt will work for images embedded in PostScript, and resample them to different DPI if you ask (I think probably more for on-screen viewing and file size reasons than printing). I would be kind of surprised if it does anything as sophisticated as "B&W or color images interspersed on the page with 1bpp text" though (i.e. analysing full page images, locating and separating text and figure regions, and choosing different encodings for each). DjVu does do some things along those lines, but it's not widely supported like PDF.