Setting up scanning

This file explains how to get started with scanning using the HP OfficeJet Linux driver (hpoj) software, using the included libsane-hpoj backend driver for SANE (Scanner Access Now Easy).

See the hpoj Supported devices page for the most up-to-date list of models with which the hpoj software supports scanning.

In case of difficulty

If something goes wrong with these instructions, then refer to both of the following separate documents for more information:

Initial setup

Make sure the prerequisite SANE packages are installed on your system before you install the hpoj software.

Before attempting to scan, also make sure you have already set up and tested basic device connectivity. By having your device(s) properly registered, libsane-hpoj should be able to detect and report all of your hpoj scanner(s) without additional configuration file editing.

If you have only one scanner, then it is the default device as far as the SANE commands listed below are concerned. If you have multiple scanners and you want to specify which one is the target of the commands below, then the SANE device name format consists of "hpoj:" (the SANE backend name) followed by the PTAL device name (for example, "hpoj:mlc:usb:PSC_900_Series").

Testing the scanner

Important: Don't run sane-find-scanner. It will not properly detect hpoj devices.

First, verify that SANE can find your device(s):

	$ scanimage --list-devices
Next, perform a "test scan":
	$ scanimage [-d hpoj:devname] --test
If your model has an ADF (automatic document feeder) but no flatbed capability, then you will first need to load a document; afterwards, you may need to open the cover to remove the page, as only part of it will be scanned for a "test scan."

Graphical scanning

xsane and xscanimage are the major graphical SANE frontends, although others are also available:
	$ xsane [hpoj:devname] &

	$ xscanimage [hpoj:devname] &
The "Preview" window allows you to perform a quick low-resolution scan and see the result right away. If you want to scan only part of the page, you can usually drag the mouse across the preview window to select the desired area and then click on the "Start" button to scan to a file.

Command-line scanning

To scan a single page and save it to out.pnm:
	$ scanimage [-d hpoj:devname] [options...] >out.pnm
To perform a batch (multi-page) scan, saving each page to out1.pnm, out2.pnm, etc.:
	$ scanimage [-d hpoj:devname] [options...] --batch --batch-scan=yes
(Yes, in most cases you must specify both the --batch and --batch-scan=yes options.)

To get a list of additional supported command-line options for scanimage and a particular device:

	$ scanimage [-d hpoj:devname] --help
Example command-line backend options for scan mode and resolution:
	--mode color
	--mode grayscale
	--mode lineart
	--resolution 300
See the manual pages for scanimage and scanadf for more information on command-line and batch scanning.

In case of difficulty

If something goes wrong with these instructions, then refer to both of the following separate documents for more information:

Next steps

You may now set up printing and/or photo-card access (depending on your model) if you haven't already, or return to the index.