Using an HP scanner on the command line

I don’t use Gnome, KDE, etc.
My window manager is WMX with some patches.

Without all those fancy window environments, you get rid of all magic auto configurations, and wizards at the same time, and you can configure your system like real man do: using the command line. ;-)

I bought a HP OfficeJet Pro 8500 A910 last week.
Here’s how I set up and use the scanner of this device using the command line:

SETUP the scanner:

> hp-mkuri -i <ip_of_your_printer>
….
hpaio:/net/Officejet_Pro_8500_A910?ip=<ip_of_your_printer>

(hp-mkuri works also for devices on routed networks: no broadcast magic needed)
Store this “hpaio:…” string in the environment variable SANE_DEFAULT_DEVICE (.bashrc)

USE the scanner:

> scanimage -y 297 -x 210 –resolution 300 | pnmtopng  > scan.png

Scans an A4 page with 300dpi.

Package used for this:
hplip         3.10.6-2    HP Linux Printing and Imaging System
sane-utils  1.0.21-9    API library for scanners — utilities