#!/bin/bash OUT="$1" [ -z "$OUT" ] && OUT=scan.pdf echo Scanning to $OUT # Scan area is specified in millimeters. A4="-x 215 -y 297" LETTER="-x 215.9 -y 279.4" SIZE="$LETTER" # FIXME: optimized for old CanoScan. Brightness is very sensitive. # MOD="--mode Color --brightness -60 --contrast 80" # device `plustek:libusb:003:110' is a Canon CanoScan N670U/N676U/LiDE20 flatbed scanner scanimage \ --resolution 150 \ $SIZE $MOD \ | pnmtops | ps2pdf - "$OUT"