5. Testing Your Scanner

Once you've completed all of the above, you're ready to test your scanner equipment. This section assumes your scanner is turned on and has been attached through the appropriate interface. If you have a SCSI or a USB scanner, at the command line you can issue the following command:

$ sane-find-scanner

...which should find and identify your scanner from a list of possible devices. If your scanner is a type not looked for by sane-find-scanner, you can try scanimage --list-devices which may yield more information about attached devices (you may need to do this twice). Note that sane-find-scanner is a separate utility that does not guarantee support under SANE, it only looks for devices that claim to be scanners.

Next you should test the scanner's image grabbing ability. You can use either one of the frontends listed in Section 6 or at the command line if you wish with the following:

$ scanimage -d backend:/dev/scanner --format pnm > outfile.pnm

Thus if you use the Epson backend, for example, the command would be as follows:

$ scanimage -d epson:/dev/scanner --format pnm > outfile.pnm

You only need the -d option if you have more than one scanner and want to select which one to use. For example, if you have an Epson and a Mustek scanner, using "-d epson" or "-d mustek" should be enough. The complete path is only needed if you have more than one scanner supported by the same backend. /dev/scanner should be substituted with whatever scanner device you've configured (or /dev/video0 in the case of a v4l device). The --format switch can be either pnm or tiff, but if left out will default to pnm. See man scanimage for more obscure but useful options. The '.pnm' format stands for 'portable anymap,' a common image format for graphical files in Linux that can be converted to nearly any other image format with Imagemagick or netpbm.