SCRIPT CONVERTOR SANE DRIVER

From: Peck Dickens <peck_d@bellsouth.net>

Here is a generic script that should drive any installation of SANE and convert (utility from ImageMagick). The script assumes you have an ADF attached to your scanner. I have used this script to scan and convert as many as 100 docs at one time. Also, the script was put together to keep memory usage under control...

-----------------------------------------------------------


#!/bin/bash
# Written by M. Peck Dickens
# Copyright 2000 InVestment Solutions, Inc.
# Published under the GNU license
# Using this script, convert only consumes core as described below when file
# format interchanging:
# PDF 45MB, PNG 25MB, PS 23MB, TIFF 23MB, HTML 23MB, GIFF 23MB
scanimage --batch
for file in *pnm
do
a=$(date +%T-%d_%m_%Y)
convert $file PDF+:$a.pdf
mv PDF* $1-$a.pdf
done
exit 0


--------------------------------------------------------------
To install on your system, save all lines from "#!/bin/bash" to "exit 0" in a text file and name it "scan" when you save it. Then change the permissions to execute.

To use the script, at the $, type in:

./scan nameyougivethisbatchofdocs

The files will have the name: nameyougavethisbatchofdocs-datetime.pdf

If anybody wants help configuring this script for different file formats or
problems they experience using it that are unique, email me off list and I will
be glad to help.

searchSearch Index