.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "SCANADF-PERL 1p" .TH SCANADF-PERL 1p "2017-02-12" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" scanadf \- acquire multiple images from a scanner equipped with an ADF .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBscanadf\fR \&\fB[ \-d | \-\-device\-name\fR \&\fIdev ]\fR \&\fB[ \-h | \-\-help ]\fR \&\fB[ \-L | \-\-list\-devices ]\fR \&\fB[ \-v | \-\-verbose ]\fR \&\fB[ \-V | \-\-version ]\fR \&\fB[ \-o | \-\-output\-file\fR \&\fIname ]\fR \&\fB[ \-N | \-\-no\-overwrite ]\fR \&\fB[ \-S | \-\-scan\-script\fR \&\fIname ]\fR \&\fB[ \-\-script\-wait ] \fR \&\fB[ \-s | \-\-start\-count\fR \&\fInum ]\fR \&\fB[ \-e | \-\-end\-count\fR \&\fInum ]\fR \&\fB[ \-r | \-\-raw ]\fR \&\fI[ device-specific-options ]\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBscanadf\fR is a command-line interface to control image acquisition devices which are capable of returning a series of images (e.g. a scanner with an automatic document feeder (\s-1ADF\s0)). The device is controlled via command-line options. After command-line processing, \&\fBscanadf\fR normally proceeds to acquire a series of images until the device returns the \&\fB\s-1SANE_STATUS_NO_DOCS\s0\fR status code. .PP The images are written to output files, specified by the \&\fB\-\-output\-file\fR option. These files are typically written in one of the \s-1PNM \s0(portable aNyMaP) formats (\s-1PBM\s0 for black-and-white images, \s-1PGM\s0 for grayscale images, and \s-1PPM\s0 for color images). Several optional frame formats (\s-1SANE_FRAME_JPEG, SANE_FRAME_G31D, SANE_FRAME_G32D, SANE_FRAME_G42D,\s0 and \s-1SANE_FRAME_TEXT\s0) are supported. In each case, the data is written out to the output file as-is without a header. Unrecognized frame formats are handled in the same way, although a warning message is printed in verbose mode. .PP Typically, the optional frame formats are used in conjunction with a scan script (specified by the \&\fB\-\-scanscript\fR option) which is invoked for each acquired image. The script is provided with a series of environment variables which describe the parameters and format of the image file. .PP \&\fBscanadf\fR accesses image acquisition devices through the \s-1SANE \s0(Scanner Access Now Easy) interface and can thus support any device for which there exists a \s-1SANE\s0 backend (try \*(L"apropos sane\e\-\*(R" to get a list of available backends). .SH "OPTIONS" .IX Header "OPTIONS" The \&\fB\-d\fR or \&\fB\-\-device\-name\fR options must be followed by a \s-1SANE\s0 device-name. A (partial) list of available devices can be obtained with the \&\fB\-\-list\-devices\fR option (see below). If no device-name is specified explicitly, \&\fBscanadf\fR will attempt to open the first available device. .PP The \&\fB\-h\fR or \&\fB\-\-help\fR options request help information. The information is printed on standard output and in this case, no attempt will be made to acquire an image. .PP The \&\fB\-L\fR or \&\fB\-\-list\-devices\fR option requests a (partial) list of devices that are available. The list is not complete since some devices may be available, but are not listed in any of the configuration files (which are typically stored in directory /etc/sane.d). This is particularly the case when accessing scanners through the network. If a device is not listed in a configuration file, the only way to access it is by its full device name. You may need to consult your system administrator to find out the names of such devices. .PP The \&\fB\-v\fR or \&\fB\-\-verbose\fR options increase the verbosity of the operation of \&\fBscanadf.\fR The option may be specified repeatedly, each time increasing the verbosity level. .PP The \&\fB\-V\fR or \&\fB\-\-version\fR option requests that \&\fBscanadf\fR print the program and package name, as well as the version number of the \s-1SANE\s0 distribution that it came with. .PP The \&\fB\-o\fR or \&\fB\-\-output\-file\fR option specifies a format string used to generate the name of file to write the image data to. You can use \f(CW%d\fR replacement in the output file name; this will be replaced with the current page number. The default format string is image\-%04d. .PP The \&\fB\-N\fR or \&\fB\-\-no\-overwrite\fR option prevents \&\fBscanadf \fR from overwriting existing image files. .PP The \&\fB\-S\fR or \&\fB\-\-scan\-script\fR option specifies the name of script to run after each scanned image is acquired. The script receives the name of the image output file as its first and only command line argument. Additionally the scan script can reference the following environment variables to get information about the parameters of the image. .IP "\fB\s-1SCAN_RES\s0\fR" 4 .IX Item "SCAN_RES" \&\- the image resolution (in \s-1DPI\s0) .IP "\fB\s-1SCAN_WIDTH\s0\fR" 4 .IX Item "SCAN_WIDTH" \&\- the image width (in pixels) .IP "\fB\s-1SCAN_HEIGHT\s0\fR" 4 .IX Item "SCAN_HEIGHT" \&\- the image height (in pixels) .IP "\fB\s-1SCAN_DEPTH\s0\fR" 4 .IX Item "SCAN_DEPTH" \&\- the image bit-depth (in bits) .IP "\fB\s-1SCAN_FORMAT\s0\fR" 4 .IX Item "SCAN_FORMAT" \&\- a string representing the image format (e.g. gray, g42d, text, etc) .IP "\fB\s-1SCAN_FORMAT_ID\s0\fR" 4 .IX Item "SCAN_FORMAT_ID" \&\- the numeric image format identifier .PP If the \&\fB\-\-script\-wait\fR option is given, scanadf will wait until all scan-scripts have been finished before exiting. That will be useful if scanadf is used in conjunction with tools to modify the scanned images. .PP The \&\fB\-s\fR or \&\fB\-\-start\-count\fR option specifies the page number of first scanned image. .PP The \&\fB\-e\fR or \&\fB\-\-end\-count\fR option specifies the last page number to scan. Using this option, you can request a specific number of pages to be scanned, rather than scanning until there are no more images available. .PP The \&\fB\-r\fR or \&\fB\-\-raw\fR option specifies that the raw image data be written to the output file as-is without interpretation. This disables the writing of the \s-1PNM\s0 header for basic frame types. This feature is usually used in conjunction with the \&\fB\-\-scan\-script\fR option where the scan script uses the environment variables to understand the format and parameters of the image and converts the file to a more useful format. \s-1NOTE:\s0 With support for the optional frame types and the default handling of unrecognized frametypes, this option becomes less and less useful. .PP As you might imagine, much of the power of \&\fBscanadf\fR comes from the fact that it can control any \s-1SANE\s0 backend. Thus, the exact set of command-line options depends on the capabilities of the selected device. To see the options for a device named \&\fIdev ,\fR invoke \&\fBscanadf\fR via a command-line of the form: .Sp .RS 4 scanadf \-\-help \-\-device \&\fIdev\fR .RE .PP The documentation for the device-specific options printed by \&\fB\-\-help\fR is explained in the manual page for \&\fBscanimage.\fR .SH "FILES" .IX Header "FILES" .IP "\fI/etc/sane.d\fR" 4 .IX Item "/etc/sane.d" This directory holds various configuration files. For details, please refer to the manual pages listed below. .ie n .SH """SEE ALSO""" .el .SH "``SEE ALSO''" .IX Header "SEE ALSO" \&\fIscanimage\fR\|(1), \fIxscanimage\fR\|(1), \fIsane\fR\|(7) .SH "AUTHOR" .IX Header "AUTHOR" Transliterated from the C original by Jeffrey Ratcliffe. .SH "BUGS" .IX Header "BUGS" All the bugs of scanadf and much, much more. .PP This program relies on the backend to return the \&\fB\s-1SANE_STATUS_NO_DOCS\s0\fR status code when the automatic document feeder is out of paper. Use of this program with backends that do not support ADFs (e.g. flatbed scanners) will likely result in repeated scans of the same document. In this case, it is essential to use the start-count and end-count to control the number of images acquired. .PP Only a subset of the \s-1SANE\s0 backends support feeders and return \&\s-1SANE_STATUS_NO_DOCS\s0 appropriately. Backends which are known to work at this time are: .IP "\fBsane-bh\fR" 4 .IX Item "sane-bh" \&\- Bell+Howell Copiscan \s-1II\s0 series scanners. .IP "\fBsane-hp\fR" 4 .IX Item "sane-hp" \&\- Hewlett Packard scanners. A patch to the sane-hp backend is necessary. The \-\-scantype=ADF option must be specified (earlier versions of the backend used the \-\-scan\-from\-adf option, instead). .IP "\fBsane-umax\fR" 4 .IX Item "sane-umax" \&\- \s-1UMAX\s0 scanners. Support exists in build 12 and later. The \-\-source=\*(L"Automatic Document Feeder\*(R" option must be specified.