LinuxCommandLibrary

hp-testpage

Print a test page on HP printers

SYNOPSIS

hp-testpage [--printer=PRINTER] [--device=DEVICE] [--background] [--maintenance-mode] [--alignment] [--color-calibration] [--clean-printhead] [-h, --help] [--version]

PARAMETERS

--printer=PRINTER
    Name of printer to print testpage (from lpstat -p)

--device=DEVICE
    Device URI (e.g., hp:/usb/HP_LaserJet...?)

--background
    Print testpage without blocking terminal

--maintenance-mode
    Print printer maintenance status page

--alignment
    Print printhead alignment page

--color-calibration
    Print color calibration page

--clean-printhead
    Print clean printhead page

-h, --help
    Display help message and exit

--version
    Show HPLIP version info

DESCRIPTION

The hp-testpage command, part of the HPLIP (HP Linux Imaging and Printing) suite, prints diagnostic and test pages for HP printers on Linux systems.

It generates a standard test page to verify basic printing functionality, or specialized pages for printer maintenance tasks like printhead cleaning, alignment, color calibration, and overall status checks.

Users typically run this after hp-setup to confirm setup success, troubleshoot issues, or perform routine upkeep. Specify a printer name via --printer or device URI with --device. Background mode allows non-blocking execution.

Requires functional CUPS integration and HPLIP tools. Supports USB, network, and other HP-compatible connections. Ideal for ensuring print quality before production use, detecting clogs or misalignments early.

Output includes color bars, text, graphics, and device info for comprehensive diagnostics. Run as regular user if printer permissions allow; sudo may be needed otherwise. Integrates seamlessly with hp-toolbox for GUI alternatives.

CAVEATS

Requires HPLIP >= 2.0 and CUPS; printer must be installed via hp-setup. Some pages need ink/toner; root may be required for USB devices. Not for non-HP printers.

USAGE EXAMPLE

hp-testpage --printer=HP_DeskJet_2130
Prints standard test page.

hp-testpage --device=hp:/net/OfficeJetPro?ip=192.168.1.100 --alignment
Prints alignment page over network.

HISTORY

Developed since HPLIP 0.9 (2005) by HP's Linux team; enhanced in later versions for better CUPS integration and page types. Actively maintained for modern HP models.

SEE ALSO

hp(1), hp-setup(1), hp-check(1), lpstat(1), hp-toolbox(1)

Copied to clipboard