LinuxCommandLibrary

foo2hiperc

Convert ESC/P printer data to hiperc format

SYNOPSIS

foo2hiperc [-P] [-p<copies>] [-n<copies>] [-l<length>] [-w<width>] [-r<res>] [-z<0-9>] [-d] [other options] [<input.pbm] [>output.hiperc]]

PARAMETERS

-P
    Preview mode: render PostScript for viewing

-p <copies>
    Number of copies to print (default 1)

-n <copies>
    Synonym for -p copies

-l <length>
    Paper length in inches (default 11)

-w <width>
    Paper width in inches (default 8.5)

-r <res>
    Resolution: 72,90,100,120,150,180,200,300 dpi (default 90)

-z <0-9>
    Compression level 0-9 (0=none, 9=best, default 7)

-d
    Duplex printing (long-edge binding)

-g <gamma>
    Gamma correction (0.1-3.0, default 1.7)

-a <w>x<h>+<x>+<y>
    Print area: width x height +xoffset +yoffset

-e
    Economy mode (toner save)

-E
    Engineering print mode (debug info)

DESCRIPTION

foo2hiperc is an open-source printer driver from the foo2zjs suite, designed to convert raster images (PBM, PGM, PPM formats) into Hiperc printer language commands. It targets specific HP LaserJet printers and compatible devices that use the proprietary Hiperc format, such as certain multifunction models.

This command-line tool acts as a filter in printing pipelines, often used with CUPS (Common Unix Printing System) via wrappers like foo2hiperc-wrapper. It supports various resolutions, paper sizes, duplex printing, and compression options to optimize output for black-and-white or grayscale printing.

Key features include gamma correction for density control, area clipping for custom print regions, and preview mode for testing without printing. It's particularly useful for legacy or non-PostScript printers lacking native Linux support. Installation typically involves the foo2zjs package from repositories or source compilation, followed by firmware downloads for full functionality.

Users invoke it directly for file conversion or integrate it into print queues. Output is binary Hiperc data sent to the printer via USB, parallel, or network.

CAVEATS

Requires printer firmware from foo2zjs project; experimental support; USBID-specific; test with -P first. Not for color printing.

EXAMPLES

foo2hiperc -P -r120 input.pbm > preview.ps
foo2hiperc -z9 -d -r180 input.ppm > output.hiperc

INSTALLATION

apt install printer-driver-foo2zjs; getweb 1018 for HP1018 firmware.

HISTORY

Developed by Till Kamppeter in 2005 as part of foo2zjs project to reverse-engineer HP's GDI/SPL protocols. Integrated into major distros; active updates until ~2015, now maintained sporadically.

SEE ALSO

Copied to clipboard