#!/bin/sh ## The simplest shell script in the world to shrink your PDFs (as in reduce filesize) under Linux with Ghostscript # Source: http://www.alfredklomp.com/programming/shrinkpdf/ ## Put this script file in a folder containing the large pdf to be converted. ## Make this script xecutable. Then run: ## ./shrinkpdf.sh yourfile.pdf ## This produces a shrunken file named out.pdf in the current directory. ### Default resolution is 72. Modify this according to your need. gs -q -dNOPAUSE -dBATCH -dSAFER \ -sDEVICE=pdfwrite \ -dCompatibilityLevel=1.3 \ -dPDFSETTINGS=/screen \ -dEmbedAllFonts=true \ -dSubsetFonts=true \ -dColorImageDownsampleType=/Bicubic \ -dColorImageResolution=72 \ -dGrayImageDownsampleType=/Bicubic \ -dGrayImageResolution=72 \ -dMonoImageDownsampleType=/Bicubic \ -dMonoImageResolution=72 \ -sOutputFile=out.pdf \ $1