scanning on linux
Hello Everyone,
Yesterday I needed to scan some documents and I borrowed an HP PSC 1110 from my sister. Knowing that the official HP drivers for that printer/scanner are distributed only in a 160MB bundle with all sorts of unnecessary software, I thought about it (for just a second) and decided to try to do my scans on linux. I do know that the HP PSC 1110 printer is damn hard to get working but would the scanner be tricky as well?
Let's get things started: scanning on linux == SANE (Scanner Access Now Easy)
So I fired up Gentoo's emerge utils and found two interesting packages: sane-frontends and sane-backends. Looks simple...
# emerge sane-frontendsbrought along sane-backends as a dependency, as expected.
Next step: Detect my USB scanner
Ok, so sane-find-scanner seems to understand that there is some kind of a scanner attached to an USB port, but does not know anything else about it. scanimage -L complains about "no scanner found".
Perhaps a specific backend is necessary to talk to that particular scanner. So I went to take a look at the hplip (HP Linux Imaging and Printing) project. Indeed they have a backend for the PSC 1110 (and others) and all I had to do was to re-emerge the hplip package with the scanner use flag activated;
# USE="scanner" emerge hplipThis time hplip installed libsane-hpaio.so and changed /etc/sane.d/dll.conf to include the following line: "hpaio" - the backend for an entire class of HP scanners including mine.
Finally scanimage -L detects my scanner as something like:
device 'hpaio:/usb/psc_1100_series?serial=XXXXXXXXXXXX' is a hp psc_1100_series multi-function peripheral. Whoohoo!!
Time to scan! Multiple frontends may be used with libsane (list of frontends) but I used what is probably the simplest available: scanimage.
$ scanimage --batch-mode=yes > file.pnmHow cool is that??
If you do not like the terminal interface, you have xsane (with gimp plugin), kooka (kde's sane frontend), openoffice, scanlite (java), sanetwain (sane to twain bridge - for windows apps), ...
Cheers, PJ.
No comments:
Post a Comment