1scanadf(1)                  General Commands Manual                 scanadf(1)
2
3
4

NAME

6       scanadf - acquire multiple images from a scanner equipped with an ADF
7

SYNOPSIS

9       scanadf    [-d|--device-name   dev]   [-h|--help]   [-L|--list-devices]
10       [-v|--verbose] [-V|--version]  [-o|--output-file  name]  [-N|--no-over‐
11       write]  [-S|--scan-script  name] [--script-wait] [-s|--start-count num]
12       [-e|--end-count num] [-r|--raw] [device-specific-options]
13

DESCRIPTION

15       scanadf is  a  command-line  interface  to  control  image  acquisition
16       devices which are capable of returning a series of images (e.g. a scan‐
17       ner with an automatic document feeder (ADF)).  The device is controlled
18       via  command-line options.  After command-line processing, scanadf nor‐
19       mally proceeds to acquire a series of images until the  device  returns
20       the SANE_STATUS_NO_DOCS status code.
21
22       The  images are written to output files, specified by the --output-file
23       option.  These files are typically written in one of the PNM  (portable
24       aNyMaP)  formats  (PBM  for  black-and-white  images, PGM for grayscale
25       images, and PPM for color  images).   Several  optional  frame  formats
26       (SANE_FRAME_JPEG,  SANE_FRAME_G31D,  SANE_FRAME_G32D,  SANE_FRAME_G42D,
27       and SANE_FRAME_TEXT) are supported.  In each case, the data is  written
28       out to the output file as-is without a header.  Unrecognized frame for‐
29       mats are handled in the same way, although a warning message is printed
30       in verbose mode.
31
32       Typically,  the  optional  frame formats are used in conjunction with a
33       scan script (specified by the --scanscript option) which is invoked for
34       each  acquired image.  The script is provided with a series of environ‐
35       ment variables which describe the parameters and format  of  the  image
36       file.
37
38       scanadf  accesses  image  acquisition devices through the SANE (Scanner
39       Access Now Easy) interface and can thus support any  device  for  which
40       there  exists  a  SANE  backend  (try  "apropos sane-" to get a list of
41       available backends).
42

OPTIONS

44       The -d or --device-name options must be followed by a SANE device-name.
45       A  (partial) list of available devices can be obtained with the --list-
46       devices option (see below).  If no device-name is specified explicitly,
47       scanadf will attempt to open the first available device.
48
49       The  -h or --help options request help information.  The information is
50       printed on standard output and in this case, no attempt will be made to
51       acquire an image.
52
53       The  -L  or  --list-devices option requests a (partial) list of devices
54       that are available.  The list is not complete since some devices may be
55       available,  but are not listed in any of the configuration files (which
56       are typically stored in directory /etc/sane.d).  This  is  particularly
57       the  case  when accessing scanners through the network.  If a device is
58       not listed in a configuration file, the only way to access it is by its
59       full device name.  You may need to consult your system administrator to
60       find out the names of such devices.
61
62       The -v or --verbose options increase the verbosity of the operation  of
63       scanadf.   The option may be specified repeatedly, each time increasing
64       the verbosity level.
65
66       The -V or --version option requests that scanadf print the program  and
67       package  name,  as  well as the version number of the SANE distribution
68       that it came with.
69
70
71       The -o or --output-file option specifies a format string used to gener‐
72       ate  the  name  of  file  to  write  the image data to.  You can use %d
73       replacement in the output file name; this will  be  replaced  with  the
74       current page number.  The default format string is image-%04d.
75
76
77       The  -N  or  --no-overwrite  option  prevents  scanadf from overwriting
78       existing image files.
79
80
81       The -S or --scan-script option specifies the  name  of  script  to  run
82       after  each scanned image is acquired.  The script receives the name of
83       the image output file as its first  and  only  command  line  argument.
84       Additionally  the  scan  script can reference the following environment
85       variables to get information about the parameters of the image.
86
87
88              SCAN_RES - the image resolution (in DPI)
89              SCAN_WIDTH - the image width (in pixels)
90              SCAN_HEIGHT - the image height (in pixels)
91              SCAN_DEPTH - the image bit-depth (in bits)
92              SCAN_FORMAT - a string representing the image format (e.g. gray,
93              g42d, text, etc)
94              SCAN_FORMAT_ID - the numeric image format identifier
95
96
97       If  the --scipt-wait option is given, scanadf will wait until all scan-
98       scripts have been finished before  exiting.  That  will  be  useful  if
99       scanadf is used in conjunction with tools to modify the scanned images.
100
101
102       The  -s  or  --start-count  option  specifies  the page number of first
103       scanned image.
104
105
106       The -e or --end-count option specifies the last page  number  to  scan.
107       Using  this  option,  you  can request a specific number of pages to be
108       scanned, rather than scanning until there are no more images available.
109
110
111       The -r or --raw option specifies that the raw image data be written  to
112       the  output file as-is without interpretation.  This disables the writ‐
113       ing of the PNM header for basic frame types.  This feature  is  usually
114       used in conjunction with the --scan-script option where the scan script
115       uses the environment variables to understand the format and  parameters
116       of the image and converts the file to a more useful format.  NOTE: With
117       support for the optional frame types and the default handling of unrec‐
118       ognized frametypes, this option becomes less and less useful.
119
120       As  you might imagine, much of the power of scanadf comes from the fact
121       that it can control any SANE backend.  Thus, the exact set of  command-
122       line  options  depends  on the capabilities of the selected device.  To
123       see the options for a device named dev, invoke scanadf via  a  command-
124       line of the form:
125
126              scanadf --help --device dev
127
128       The  documentation for the device-specific options printed by --help is
129       explained in the manual page for scanimage.
130
131

FILES

133       /etc/sane.d
134              This directory holds various configuration files.  For  details,
135              please refer to the manual pages listed below.
136

SEE ALSO

138       scanimage(1), xscanimage(1), sane(7)
139
140

AUTHOR

142       scanadf  is  an  adaptation  by  Tom Martone of scanimage by David Mos‐
143       berger, Andreas Beck, and Gordon Matzigkeit following closely the  fea‐
144       tures of bnhscan by Sean Reifschneider of tummy.com, ltd.
145
146

BUGS

148       Please send reports to sane-devel@lists.alioth.debian.org.
149
150       This  program  relies  on the backend to return the SANE_STATUS_NO_DOCS
151       status code when the automatic document feeder is out of paper.  Use of
152       this program with backends that do not support ADFs (e.g. flatbed scan‐
153       ners) will likely result in repeated scans of the  same  document.   In
154       this case, it is essential to use the start-count and end-count to con‐
155       trol the number of images acquired.
156
157
158       Only a subset of the SANE backends support feeders and return SANE_STA‐
159       TUS_NO_DOCS  appropriately.   Backends  which are known to work at this
160       time are:
161
162              sane-bh - Bell+Howell Copiscan II series scanners.
163              sane-hp - Hewlett Packard scanners.   A  patch  to  the  sane-hp
164              backend  is necessary.  The --scantype=ADF option must be speci‐
165              fied (earlier versions of the backend used  the  --scan-from-adf
166              option, instead).
167              sane-umax  -  UMAX  scanners.   Support  exists  in build 12 and
168              later.  The --source="Automatic Document Feeder" option must  be
169              specified.
170
171
172
173
174
175                                  30 Oct 2004                       scanadf(1)
Impressum