#!/bin/sh if test $# -lt 1 then echo "Usage: $0 file.pdf" echo " Scan the current document in your scanner and create" echo " an A4, 200dpi, gray scale pdf file file.pdf out of it." exit 1 fi scanimage --resolution=200 -x 215 -y 297 --mode=gray --format=jpeg > /tmp/scan2pdf-tmp.jpeg convert -depth 200 /tmp/scan2pdf-tmp.jpeg $1 rm /tmp/scan2pdf-tmp.jpeg