You can adapt it to your own paths and printer. I will make more sophisticated one in the future. This allows for line-mode scanning at 300 dpi of letter sized documents.
cd /home/aroberts/.scans
scanimage -d hpoj:mlc:usb:HP_LaserJet_3200M -x 214.2 -y 277.2 --mode lineart
--resolution 300 --format tiff --source ADF --batch --batch-scan=yes
#convert -verbose -shave 5x600 out*.tif out.jpg
#convert -verbose -crop 1275x1650 out*.tif out.jpg
nice convert -verbose out*.tif out.jpg
PDFDIR="/home/aroberts/references-all/references-Campbell and Atkins/pdfs"
echo "What would you like to call the pdf (Note: don't need to end it with .pdf)?"
read PDFname
PDFOUTLIN=$PDFDIR/$PDFname.pdf
PDFOUTWIN=z:$PDFOUTLIN
export PSTILL_PATH=/opt/pstill_dist
nice /opt/pstill_dist/pstill -F letter -g -v -c -c -c -c -o "$PDFOUTLIN"
/home/aroberts/.scans/*.jpg
rm -f /home/aroberts/.scans/*
#/usr/bin/acroread /home/aroberts/out.pdf
#/home/aroberts/.cxoffice/win98.main/desktopdata/cxmenu/Desktop/Adobe+Acrobat+5.0 z:/home/aroberts/out.pdf
/opt/cxoffice/bin/wine --bottle=win98.main --verbose --cx-app=acrobat "$PDFOUTWIN"