What command to use in the terminal to scan multiple pages? I normally use scanimage > myimage.pnm for 1 page scanning.
- 102,391
- 106
- 255
- 328
- 83
- 1
- 1
- 3
-
Batch scan a lot of pictures (on Super User) is an equivalent question. – Scott - Слава Україні Feb 22 '15 at 11:13
2 Answers
The --batch* options provide the features for scanning documents using document feeders. --batch [format] is used to specify the format of the filename that each page will be written to. Each page is written out to a single file. If format is not specified, the default of out%d.pnm (or out%d.tif for --format tiff) will be used. format is given as a printf style string with one integer parameter.
--batch-startstart selects the page number to start naming files with. If this option is not given, the counter will start at 0.--batch-countcount specifies the number of pages to attempt to scan. If not given, scanimage will continue scanning until the scanner returns a state other than OK. Not all scanners with document feeders signal when the ADF is empty, use this command to work around them.With
--batch-incrementincrement you can change the amount that the number in the filename is incremented by. Generally this is used when you are scanning double-sided documents on a single-sided document feeder.A specific command is provided to aid this:
--batch-doublewill automatically set the increment to 2.--batch-promptwill ask for pressing RETURN before scanning a page. This can be used for scanning multiple pages without an automatic document feeder.
-
miss a commandline example... was not working for me for example a "scanimage --format=jpeg --resolution=150 -b ~/locations/documents/$(date +%Y%m%d)factures%d.jpg" – Philippe Gachoud Feb 24 '15 at 11:17
-
Note that if you don't mention the document size (using
-xand-yoptions ofscanimage), all pages of the ADF may be seen as a single page. – Skippy le Grand Gourou Apr 14 '15 at 12:48 -
What about on scanners that "feed" the document through? I'm sick of having to wait an equal amount of time for the scanner to "connect" as it takes to actually scan a full length item, simple because I have to invoke
scanimageevery time i want to scan one page! – Michael Jun 18 '19 at 02:41
scanimage --format tiff --batch=$(date +%Y%m%d_%H%M%S)_p%04d.tiff --resolution 150
Followed by convert *.tiff yourDocumentName.pdf if you need it to be a PDF
See scanimage --help for more options
- 5,900
- 3
- 43
- 50