scanadf(1)
π scanadf β bestie's guide to eating a whole stack of paper π
okay so first things first: this is scanadf(1), straight out of the General Commands Manual, and it's literally the girl who grabs every single page off your scanner's automatic document feeder without you having to babysit her. sit down, grab a snack, we're doing this π
β¨ NAME β¨
scanadf β acquire multiple images from a scanner equipped with an ADF. not one. not two. a whole stack, bestie. π¦
β¨ SYNOPSIS β¨
scanadf [-d|--device-name dev] [-h|--help] [-L|--list-devices]
[-v|--verbose] [-V|--version] [-o|--output-file name] [-N|--no-
overwrite] [-S|--scan-script name] [--script-wait] [-s|--start-count
num] [-e|--end-count num] [-r|--raw] [device-specific-options]
πΈ DESCRIPTION πΈ
scanadf 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 (ADF)). The device is controlled via command-line options. After command-line processing, scanadf normally proceeds to acquire a series of images until the device returns the SANE_STATUS_NO_DOCS status code.
The images are written to output files, specified by the --output-file option. These files are typically written in one of the PNM (portable aNyMaP) formats (PBM for black-and-white images, PGM for grayscale images, and PPM for color images). Several optional frame formats (SANE_FRAME_JPEG, SANE_FRAME_G31D, SANE_FRAME_G32D, SANE_FRAME_G42D, and SANE_FRAME_TEXT) 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.
Typically, the optional frame formats are used in conjunction with a scan script (specified by the --scanscript 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. π
scanadf accesses image acquisition devices through the SANE (Scanner Access Now Easy) interface and can thus support any device for which there exists a SANE backend (try "apropos sane-" to get a list of available backends). π«Ά
β¨ OPTIONS β¨
not me listing every single one because every single one matters π
-d,--device-nameβ must be followed by a SANE device-name. A (partial) list of available devices can be obtained with the--list-devicesoption (see below). If no device-name is specified explicitly,scanadfwill attempt to open the first available device.-h,--helpβ requests help information. The information is printed on standard output and in this case, no attempt will be made to acquire an image.-L,--list-devicesβ 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@CONFIGDIR@). 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. π-v,--verboseβ increase the verbosity of the operation ofscanadf. The option may be specified repeatedly, each time increasing the verbosity level. it's giving volume knob π₯-V,--versionβ requests thatscanadfprint the program and package name, as well as the version number of the SANE distribution that it came with.-o,--output-fileβ specifies a format string used to generate the name of file to write the image data to. You can use%dreplacement in the output file name; this will be replaced with the current page number. The default format string isimage-%04d.-N,--no-overwriteβ preventsscanadffrom overwriting existing image files. protective queen behavior, love that πΈ-S,--scan-scriptβ 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:SCAN_RESβ the image resolution (in DPI)SCAN_WIDTHβ the image width (in pixels)SCAN_HEIGHTβ the image height (in pixels)SCAN_DEPTHβ the image bit-depth (in bits)SCAN_FORMATβ a string representing the image format (e.g.gray,g42d,text, etc)SCAN_FORMAT_IDβ the numeric image format identifier
If the --script-wait 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. β³
-s,--start-countβ specifies the page number of first scanned image.-e,--end-countβ 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.-r,--rawβ specifies that the raw image data be written to the output file as-is without interpretation. This disables the writing of the PNM header for basic frame types. This feature is usually used in conjunction with the--scan-scriptoption 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. NOTE: With support for the optional frame types and the default handling of unrecognized frametypes, this option becomes less and less useful. π (rip, she's aging)
As you might imagine, much of the power of scanadf comes from the fact that it can control any SANE 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 dev, invoke scanadf via a command-line of the form:
scanadf --help --device dev
The documentation for the device-specific options printed by --help is explained in the manual page for scanimage. π
π FILES π
@CONFIGDIR@β This directory holds various configuration files. For details, please refer to the manual pages listed below.
π¦ SEE ALSO π¦
scanimage(1), xscanimage(1), sane(7)
π AUTHOR π
scanadf is an adaptation by Tom Martone of scanimage by David Mosberger, Andreas Beck, and Gordon Matzigkeit following closely the features of bnhscan by Sean Reifschneider of tummy.com, ltd. β shoutout to the whole lineage fr fr π
π BUGS π
Please send reports to sane-devel@lists.alioth.debian.org.
This program relies on the backend to return the SANE_STATUS_NO_DOCS 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. π¨
not me warning you twice β if your backend doesn't do ADFs, you'll get the same page over and over forever. use-sand-e. periodt.
Only a subset of the SANE backends support feeders and return SANE_STATUS_NO_DOCS appropriately. Backends which are known to work at this time are:
sane-bhβ Bell+Howell Copiscan II series scanners.sane-hpβ Hewlett Packard scanners. A patch to thesane-hpbackend is necessary. The--scantype=ADFoption must be specified (earlier versions of the backend used the--scan-from-adfoption, instead).sane-umaxβ UMAX scanners. Support exists in build 12 and later. The--source="Automatic Document Feeder"option must be specified.
and that's the whole page bestie, no cap π β this was scanadf(1) from the General Commands Manual, dated 30 Oct 2004. go feed a scanner, you've got this π«Άβ¨
π¦ where this page comes from
- debian bookworm: sane 1.0.14-17 Β· GPL-2.0-or-later WITH sane exception
- ubuntu jammy: sane 1.0.14-16 Β· GPL-2.0-or-later WITH sane exception
- ubuntu noble: sane 1.0.14-18 Β· GPL-2.0-or-later WITH sane exception
- ubuntu questing: sane 1.0.14-18ubuntu1
- ubuntu resolute: sane 1.0.14-18.1 Β· GPL-2.0-or-later WITH sane exception
- ubuntu stonking: sane 1.0.14-18.1 Β· GPL-2.0-or-later WITH sane exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms