LinuxCommandLibrary

hp-testpage

Print a test page on HP printers

SYNOPSIS

hp-testpage [PRINTER_NAME] [OPTIONS]

PARAMETERS

PRINTER_NAME
    The name of the printer to which the test page should be sent. If omitted, the default system printer is usually used.

-p PRINTER, --printer=PRINTER
    Explicitly specifies the name of the printer to use for printing the test page. This is useful when multiple HP printers are configured.

-v, --version
    Displays the version information of the hp-testpage utility and exits.

-h, --help
    Shows a help message detailing the command's usage and available options.

-i, --info
    Provides verbose information, typically integrating output similar to hp-info for diagnostic purposes.

-d, --debug
    Enables debug output, which can be useful for advanced troubleshooting by developers or experienced users.

-t, --terminal
    Forces the command to run in terminal mode, suppressing any potential GUI elements.

-x, --x-display
    Specifies an X-display for graphical operations, primarily relevant if the command would otherwise launch a GUI (though less common for hp-testpage itself).

DESCRIPTION

The hp-testpage command is a utility provided by the HPLIP (HP Linux Imaging and Printing) project. Its primary function is to print a standard test page to an HP printer configured on a Linux system. This command is invaluable for verifying the correct setup and functionality of a printer after installation or for troubleshooting connectivity and printing issues. By generating a simple, known output, it helps determine if the problem lies with the printer itself, the print queue, or the application attempting to print. It can be run in a terminal and typically allows specifying a target printer, making it a quick diagnostic tool for administrators and users alike.

CAVEATS

Requires the HPLIP package to be installed and properly configured on the system.
The target HP printer must be powered on, connected to the network or system (via USB/network), and configured within the CUPS printing system.
If the test page fails to print, it often indicates an issue with printer connectivity, driver installation, or CUPS queue configuration rather than the hp-testpage command itself.

HISTORY

The hp-testpage command is an integral part of the HPLIP project, which began development in the early 2000s to provide comprehensive open-source support for HP printers, scanners, and multi-function devices on Linux and other Unix-like operating systems. Its inclusion reflects the need for a straightforward diagnostic tool within the HPLIP suite, allowing users to quickly verify the basic functionality of their HP printing devices without needing to rely on application-specific printing functions. Its usage has remained consistent over the years as a fundamental troubleshooting step.

SEE ALSO

hp-setup(1), hp-info(1), lp(1), lpr(1), cupsd(8)

Copied to clipboard