[sane-devel] HP, ADF and PDF

Marvin Dickens peck_d@bellsouth.net
Sat, 24 Aug 2002 23:23:18 -0400


> Hi,
>
> I have a couple of loose A4 papers I would like to collect in a pdf. Is
there
> a way to do this automatically?
> The ADF works, but I would have to press change document for each page,
which
> is a little bit annoying...


This simple script will do everything you stated that you want to do:

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

#!/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

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

However, to use this script, you need SANE, ImageMagick as well as a
*current* release
of Ghostscript.


Best

Marvin Dickens