LinuxCommandLibrary

hp-scan

Scan documents using HP devices

SYNOPSIS

hp-scan [--device=DEVICE#] [--gui | --batch[=NAME]] [--source=SRC] [--mode=MODE] [--resolution=RES] [--scan-dpi=DPI] [--color-mode=MODE] [other options]

PARAMETERS

--batch[=name]
    Enable batch scanning mode with optional profile name

--batch-count=NUM
    Number of pages to scan in batch mode

--batch-dpi=DPI
    Scan resolution in batch mode (75-600)

--color-mode=mode
    Color mode: Color|Grayscale|Lineart

--debug
    Turn on debugging messages

--device=DEV#
    Specify device number (use hp-find to list)

--device-uri=URI
    Specify device URI

--gui
    Launch graphical scan interface (default)

--help
    Show help and exit

--lang=lang
    Set language (e.g., en, fr)

--mode=mode
    Scan mode: photo|document|tiff-compressed

--output=file
    Output filename

--resolution=RES
    Preview/scan resolution (75,150,300,600)

--scan-dpi=DPI
    Final scan DPI

--source=Flatbed|ADF
    Scan source

--version
    Print version info

DESCRIPTION

hp-scan is a versatile command-line tool from the HPLIP (HP Linux Imaging and Printing) package, designed for scanning documents and images using HP multifunction printers and scanners on Linux systems. It provides both graphical user interface (GUI) and batch command-line modes, supporting features like automatic document feeder (ADF) scanning, duplex scanning, color/gray/lineart modes, and output to formats such as PDF, JPEG, PNG, TIFF.

In GUI mode (default), it launches hp-scanwindow, offering intuitive controls for previewing, cropping, enhancing, and saving scans. Batch mode enables automated, scriptable scanning with predefined profiles for high-volume tasks.

It integrates with SANE backend, supports device discovery via hp-find, and handles plugin-based advanced features. Ideal for home and office use, it ensures compatibility with most USB and network-connected HP devices.

CAVEATS

Requires HPLIP package and matching device plugin installed. Network devices need proper URI setup. GUI requires Qt libraries. Batch mode may fail without valid profiles. Not all HP models fully supported; check HPLIP compatibility list.

PROFILES

Pre-configure batch profiles with hp-probe or GUI for repeatable scans: hp-scan --batch=MyProfile.

DEPENDENCIES

Needs sane-backends, python3-pyqt5, HPLIP >=3.20. Install via apt install hplip hplip-gui or equivalent.

HISTORY

Developed by HP as part of HPLIP project starting around 2005 to provide Linux support for HP imaging devices. Evolved with HPLIP releases, adding batch features in 3.x series (2010s), plugin architecture for proprietary functions, and improved SANE integration. Maintained actively with Ubuntu/Fedora integrations.

SEE ALSO

hp-find(1), hp-setup(1), hp-print(1), scanimage(1), simple-scan(1), xsane(1)

Copied to clipboard