Scanimage: command line alternative for scanning

As discussed previously, several Fujitsu scanners are no longer supported in MacOs Catalina. Having tried ExactScan and VueScan, I ended up with “scanimage”. This is a command line tool and a frontend to the sane open source project. For example this command for my ScanSnap S510M scanner:

scanimage --device fujitsu \
 --source "ADF Duplex" \
 --page-width 210 \
 --page-height 297 \
 --mode Gray \
 --resolution 150 \
 --format=tiff \
 --contrast 12 \
 --batch=scan-$(date +%Y.%m.%d.%H.%M.%S)_p%d.tiff \

would generate tiff images. The resulting TIFF files can be converted to pdf using the “convert” tool from imagemagick:

convert -quality 40 -gamma 1.4 -compress jpeg scan-*.tiff scan-$(date +%Y.%m.%d.%H.%M.%S).pdf

Both sane and imagemagick can be installed with homebrew on the Mac.

Additionally, the scantailor-cli tool can be used for deskewing or textcleaner for cleaning up the images. The ScanTailor tool must be compiled though.

1 Like

Interesting. Thanks

Thanks for this posting.

I’ve got scanimage working, but for one hitch: each scan take a considerable amount of time to execute.

From what I gather the cause of the delay is not specifying --device, which causes scanimage to search for a locally available machine.

The obvious solution: specify --device.

That’s the curious part:
--device fujitsu doesn’t work, even though the device being used is a a Fujitsu iX500.

Error returned: "scanimage: *open of device fujitsu failed: Invalid argument*"

Running sudo scanimage -L returns fujitsu:ScanSnap iX500:[s/n] (where [s/n] is a partial serial number of the scanner)

Unfortunately, none of the following worked either…
--device 'fujitsu:ScanSnap iX500:[s/n]'
--device 'fujitsu:ScanSnap iX500'
--device 'fujitsu:ScanSnap'
--device 'fujitsu'

Question: How to properly specify --device for a Fujtsu iX500?

scanimage works if I leave out the --device option altogether, but each scan takes a long time to auto-discover the attached scanner.

Try “scanimage --help -d DEVICE”. This should return the device name to be used with the --device option. Good luck.

Thanks psinn,

The solution, it turned out, was simply to run the command as super user under sudo.