LinuxCommandLibrary

foo2hbpl2

Convert foo2zjs output to HP/PCL

SYNOPSIS

foo2hbpl2 [options]

PARAMETERS

-d
    Set the color depth (e.g., 8 for 256 colors, 24 for true color). Default is auto-detected from input.

-r x
    Set the horizontal and vertical resolution (e.g., -r 600x600). Default is 300x300.

-p
    Set the paper size. Common values include Letter, A4, etc. Consult the foo2zjs documentation for supported paper sizes.

-m
    Set the paper margins.

-l
    PCL Level (e.g., 4 or 5). Determines the PCL version to use. The default is normally sufficient.

-n
    Set the number of copies to print. The default is 1.

-z
    Passes an option directly to the PCL interpreter. Consult the foo2zjs documentation for a complete list of valid options.

-u
    Select USB printing

-v
    Verbose output.

DESCRIPTION

The `foo2hbpl2` command is a utility used within the `foo2zjs` printer driver framework. It takes raster data generated by `foo2zjs` (which is typically Ghostscript output) and converts it into the HP PCL (Printer Control Language) format. This allows printing to HP LaserJet and other PCL-compatible printers, especially those that are "winprinters" relying on the host computer for rasterization.

The foo2zjs driver series is primarily designed to support printers which lack on-board processing capabilities. The `foo2hbpl2` command acts as the final stage in a processing chain, taking the pre-rendered data and packaging it in a format the printer can understand and print. Usually this command is part of a printing script and rarely called manually. It accepts data on standard input and writes the resulting PCL stream to standard output.

CAVEATS

The `foo2hbpl2` command is highly dependent on the configuration and operation of the `foo2zjs` driver. It's not typically used as a standalone tool. The output is very specific to the printer it is intended for.

USAGE EXAMPLE

A typical usage scenario involves piping the output of Ghostscript (gs) through `foo2zjs` and then through `foo2hbpl2`, finally sending the result to the printer.
Example:
`gs -q -dNOPAUSE -dBATCH -sDEVICE=ppmraw -sOutputFile=- file.ps | foo2zjs -r600x600 | foo2hbpl2 > /dev/usb/lp0`

TROUBLESHOOTING

If printing fails, check the following: 1. Ensure that the `foo2zjs` driver is correctly installed and configured for your printer model. 2. Verify that the Ghostscript command is producing valid raster data. 3. Examine the error messages (if any) output by `foo2hbpl2`. 4. Ensure the printer port is correct (`/dev/usb/lp0` is a common USB printer port; adjust as necessary).

HISTORY

The `foo2hbpl2` command is a component of the `foo2zjs` open-source printer driver project. The driver was created to support low-cost, host-based printers, which rely heavily on the host computer's processing power for rasterization. Development focused on reverse-engineering and creating open-source alternatives to proprietary drivers. The toolchain, including `foo2hbpl2`, allows Linux and other Unix-like systems to effectively utilize these printers.

SEE ALSO

foo2zjs(1), ghostscript(1), lpr(1)

Copied to clipboard