8

What command to use in the terminal to scan multiple pages? I normally use scanimage > myimage.pnm for 1 page scanning.

1

2 Answers 2

11

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-start start selects the page number to start naming files with. If this option is not given, the counter will start at 0.

  • --batch-count count 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-increment increment 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-double will automatically set the increment to 2. --batch-prompt will ask for pressing RETURN before scanning a page. This can be used for scanning multiple pages without an automatic document feeder.

3
  • 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" Feb 24, 2015 at 11:17
  • Note that if you don't mention the document size (using -x and -y options of scanimage), all pages of the ADF may be seen as a single page. Apr 14, 2015 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 scanimage every time i want to scan one page!
    – Michael
    Jun 18, 2019 at 2:41
6

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .