- #!/bin/bash
- #
- # /Share/Scans/ReducePDF.sh
- #
- # Script Created By ...redacted....
- #
- # This script is used to reduce the size of PDF files using Ghost Script and place them into a new folder.
- #
- # Ghost Script usually has a slew of errors on output, this is normal, you can ignore these.
- #
- #monitor folder for new Scans
- #resize PDF with Ghost Script
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=${1%\.pdf}-smaller.pdf $1 > /dev/null
- #move reduced file to /Share/Scans/Smaller Folder
- mv *-smaller.pdf ./Smaller/$1-smaller.pdf
SHARE
TWEET
ghostscript
a guest
Nov 30th, 2012
126
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data
