LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

scanadf

Batch scan from automatic document feeder

TLDR

Scan all pages from the document feeder
$ scanadf -o [output_%d.pnm]
copy
Scan a specific number of pages
$ scanadf -e [5] -o [page_%d.pnm]
copy
Scan starting from a specific page number
$ scanadf -s [1] -o [scan_%d.pnm]
copy
Scan with a specific device
$ scanadf -d [device_name] -o [output_%d.pnm]
copy
Run a script after each page is scanned
$ scanadf -S [process.sh] -o [page_%d.pnm]
copy
Scan without overwriting existing files
$ scanadf -N -o [output_%d.pnm]
copy

SYNOPSIS

scanadf [-d device] [-o file] [-s num] [-e num] [-S script] [device-options]

DESCRIPTION

scanadf is a command-line tool for acquiring multiple images from scanners with automatic document feeders (ADF). It scans pages sequentially until the feeder is empty, writing each page to a numbered output file.The tool uses the SANE interface and supports any scanner with a SANE backend. Output is typically in PNM format (PBM, PGM, or PPM depending on scan mode). Scanner-specific options like resolution and source can be passed directly.Some scanners require specific source options: UMAX uses --source="Automatic Document Feeder", HP uses --scantype=ADF.

PARAMETERS

-d device, --device-name=device

Use the specified scanner device
-o file, --output-file=file
Output filename format; %d is replaced with page number
-s num, --start-count=num
Page number of first scanned image
-e num, --end-count=num
Last page number to scan
-S script, --scan-script=script
Script to run after each image is acquired
-N, --no-overwrite
Prevent overwriting existing image files
-r, --raw
Write raw image data without interpretation
-L, --list-devices
List available scanner devices
-v, --verbose
Increase verbosity level

CAVEATS

The scanner backend must support ADF and return SANESTATUSNO_DOCS when the feeder is empty. Using scanadf with flatbed-only scanners will repeatedly scan the same page; always use -e to limit page count. The %d placeholder in output filenames is required for multiple pages.

HISTORY

scanadf is part of the SANE (Scanner Access Now Easy) project, providing specialized support for document feeders. It complements scanimage by handling the multi-page workflow common in document scanning scenarios.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid