Notes
How to scan a document from console
Use scanimage
from sane-utils
package.
Scan a single document from flat bed:
$ scanimage --mode Color --resolution 150 > out.pnm
Scan N pages from document feeder (Brother MFC-J615W)
$ scanimage -b --batch-count=N --source "Automatic Document Feeder(left aligned)"