scan an image from the commandline (epson Stylus sx440w)

on

We got this cheap all-in-one wireless epson Stylus sx440w printer. Got it to work on our macs and Ubuntu laptops.

That’s nice scanning from a gui interface, but how to scan from a headless machine (our do it all linux server).

These where the installationsteps I performed, as mentioned in the step by step guide from epson

1. Install data package

 sudo apt-get install xsltproc
 sudo dpkg -i iscan-data_1.18.0-1_all.deb

2. Install core package

 sudo apt-get install libgphoto2-port0
 sudo apt-get install libgphoto2-2
 sudo apt-get install libsane
 sudo dpkg -i iscan_2.29.1-5~usb0.1.ltdl7_amd64.deb

3. Install network package

sudo dpkg -i iscan-network-nt_1.1.0-2_amd64.deb

4. Install saneutils

sudo apt-get install sane-utils

6. edit scanner config file

sudo vi /etc/sane.d/epkowa.conf

Now:
– clear the complete file
– add only 1 line: net 192.168.2.233 ##ipadress of scanner
( ie rm epkowa.conf; echo “net 192.168.2.233 > epkowa.conf )

7. scaninformation

scanimage -L

results in:
device `epson2:net:192.168.1.132′ is a Epson PID 0884 flatbed scanner
device `epkowa:net:192.168.1.132′ is a Epson Stylus TX435W/NX430/SX440W Series flatbed scanner

6. scan an image and convert to png or jpg

scanimage --mode color --resolution 300 > image.pnm
convert image.pnm image.png 
convert image.pnm image.jpg

Look mom without Gui!