Shell script for compressing PDF files on Ubuntu

I have previously written about a shell script) for compressing PDF files in Ubuntu. Here are some variants of the script. Low, mid, and high resolution Low resolution for screen: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf in.pdf I prefer the “ebook” mode, which has slightly higher resolution: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf in.pdf And then there is the high resolution for printing: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out....

August 23, 2020 · 1 min · 175 words · ARJ

Shell script for compressing PDF files on Ubuntu

Back on OSX one of my favourite small programs was called PDFCompress, which compressed a large PDF file into something more manageable. There are many ways of doing this on Ubuntu as well, but nothing really as smooth as I used to on OX. Finally I took the time to figure out how I could make a small shell script based on ghostscript. The whole script looks like this: #!/bin/sh gs -sDEVICE=pdfwrite -dCompatibilityLevel=1....

June 29, 2016 · 1 min · 139 words · ARJ