config

Personal configuration.
git clone git://code.dwrz.net/config
Log | Files | Refs

compress-pdf (340B)


      1 #!/usr/bin/env bash
      2 
      3 # option   resolution
      4 # default  72
      5 # screen   72
      6 # ebook    150
      7 # printer  300
      8 # prepress 300
      9 quality="$3"
     10 if [[ -z "${quality}" ]]; then
     11   quality="ebook"
     12 fi
     13 
     14 gs -sDEVICE=pdfwrite \
     15    -dCompatibilityLevel=1.4 \
     16    -dPDFSETTINGS=/"${quality}" \
     17    -dNOPAUSE \
     18    -dQUIET \
     19    -dBATCH \
     20    -sOutputFile="$2" \
     21    "$1"