LinuxCommandLibrary

foo2hbpl2-wrapper

Convert raster data to HP-GL/2 plotter language

SYNOPSIS

foo2hbpl2-wrapper [options] [input.ps|input.pdf]

PARAMETERS

-r x
    Sets the printer resolution in dots per inch (DPI), e.g., 600x600.

-d
    Specifies duplex (double-sided) printing mode. Common values are 1 for long-edge binding and 2 for short-edge binding.

-p
    Selects the paper size. For example, 0 for Letter, 1 for Legal, 2 for A4. Specific values depend on the printer model.

-m
    Sets the media type. For example, 0 for Plain Paper, 1 for Transparency.

-t
    Enables toner save mode, reducing toner consumption for draft quality.

-l
    Adjusts the darkness/lightness of the printout. Values typically range from 0 (lightest) to 100 (darkest).

-s
    Selects the input paper tray. For example, 0 for the main tray, 1 for the manual feed slot.

-A
    Automatically determines paper size from the input document's PostScript/PDF properties.

-G
    Applies gamma correction to the output image to adjust brightness and contrast.

-L
    Prints in landscape orientation, rotating the image 90 degrees.

-o
    Redirects the output to a specified file instead of standard output (stdout).

-V
    Enables verbose output, showing progress and debug information to stderr.

-h
    Displays a help message with available options and their usage.

DESCRIPTION

The foo2hbpl2-wrapper command acts as a crucial interface for Linux systems to print to specific Host-Based (GDI) HP LaserJet printers, particularly the 1000 and 1005 series, that use the proprietary HbPL2 (Host-based Printer Language 2) page description language. Unlike PostScript or PCL printers, these devices rely on the host computer to render print jobs into a raster image, which is then sent to the printer.

This wrapper script typically receives PostScript or PDF input (often from CUPS, Ghostscript, or directly via a pipe), processes it, converts it into the printer's native HbPL2 format, and then sends the raw data to the printer. It is an integral part of the foo2zjs project, enabling broad support for many otherwise unsupported HP printers on Linux.

CAVEATS

Firmware Dependency: Some HP LaserJet 1000/1005 models require a proprietary firmware file to be downloaded to the printer at startup. This firmware is often not included with the driver and must be obtained separately or installed via a helper script (e.g., foo2zjs-install). Without the correct firmware, the printer will not function.

Monochrome Only: The HbPL2 language and associated printers are monochrome (black and white) only. Color information in input documents will be converted to grayscale.

Host-Based Processing: As a host-based solution, significant CPU resources on the host computer are used to render the print job, which can be slower than PCL or PostScript printers that handle rendering internally.

FIRMWARE DOWNLOAD

For HP LaserJet 1000/1005 printers, a small proprietary firmware file must be downloaded to the printer's RAM each time the printer is powered on. This is often handled by a helper script or by CUPS, but users should be aware that the printer may appear unresponsive until this firmware is loaded.

HISTORY

The foo2hbpl2-wrapper command is an integral part of the foo2zjs open-source project, initiated and primarily developed by Rick van Rein. The project began in the early 2000s to provide Linux support for a wide range of previously unsupported Host-Based (GDI) printers, particularly those from HP, Lexmark, and Minolta, which used proprietary page description languages like ZjStream, HbPL2, and ZjStream. Its development filled a critical gap, enabling users to continue using affordable consumer-grade printers on Linux without manufacturer-supplied drivers.

SEE ALSO

cups(8), gs(1), foo2zjs(1), foo2zjs-wrapper(1)

Copied to clipboard