handy script

David Mosberger-Tang (davidm@azstarnet.com)
Fri, 18 Jul 1997 17:08:41 -0700

Here is a little script I find handy to make photocopies using a
scanner and a printer. I call it "xerox" and by invoking it, the
image in my Mustek scanner gets scanned and then printed on my
DeskJet. The print quality isn't great, but it's neat, still. You
obviously may want to tune the first four parameters to your
environment.

--david

#!/bin/sh
DEV=mustek:/dev/scanner
RES=300
WIDTH=8 # inches
HEIGHT=10 # inches
#
SCALE=`bc <<_EOF_
scale=3
72/${RES}
_EOF_`
scanimage -d $DEV -x ${WIDTH}\" -y ${HEIGHT}\" --resolution ${RES} | \
pnmtops -center -rle -scale ${SCALE} | lpr

--
Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
To unsubscribe: mail -s unsubscribe sane-devel-request@listserv.azstarnet.com