LinuxCommandLibrary

foo2hiperc

Convert ESC/P printer data to hiperc format

SYNOPSIS

foo2hiperc [options] [file.ps]

PARAMETERS

-r res
    Sets the resolution for the output, in dots per inch (DPI). Common values include 600 or 1200.

-g gamma
    Applies a gamma correction value to adjust image brightness and contrast. A value of 1.0 indicates no correction.

-d duplex
    Specifies the duplex printing mode: 0 for no duplex, 1 for long-edge binding, or 2 for short-edge binding.

-c color
    Defines the color mode for printing: 0 for greyscale (monochrome) or 1 for color output.

-L num
    Controls linear mode for dithering, affecting how colors are rendered. Typically 0 (off) or 1 (on).

-m media
    Sets the media (paper) size, e.g., Letter, Legal, A4, A5.

-p source
    Selects the paper source or tray, usually an integer representing the tray number (e.g., 1 for main tray).

-n N-up
    Enables N-up printing, where multiple pages are printed per physical sheet of paper (e.g., 2 for 2-up, 4 for 4-up).

-s source
    Specifies the input source. 0 typically denotes standard input (stdin).

-t num
    Sets the top offset for printing, in points.

-b num
    Sets the bottom offset for printing, in points.

-l num
    Sets the left offset for printing, in points.

-R num
    Sets the right offset for printing, in points. Note: The option is capitalized 'R' to distinguish from lowercase 'r' for resolution.

-A
    Automatically scales pages to fit the selected media size.

-G
    Instructs the command to use Ghostscript's own gamma processing, rather than internal adjustments.

-X num
    Sets the horizontal (X) offset in pixels.

-Y num
    Sets the vertical (Y) offset in pixels.

-P printer
    Selects a specific printer model or variant if the driver supports multiple devices under the Hiper protocol.

-u units
    Defines the units for offset parameters: 0 (points), 1 (pixels), 2 (mils), 3 (mm).

-D level
    Sets the debug level for verbose output, useful for troubleshooting. Higher numbers typically mean more detailed output.

DESCRIPTION

foo2hiperc is a utility that converts PostScript (PS) files into a proprietary raster format used by certain printers, particularly those employing the Hiper protocol, often associated with Zenographics ZjStream. It is part of the foo2zjs project, a collection of drivers and filters designed to support various GDI (Graphics Device Interface) printers that lack native PostScript support. This command acts as a filter, typically taking PostScript input from stdin or a specified file and outputting the printer-specific data to stdout. It handles various aspects of print job preparation, including resolution, paper size, duplexing, and color adjustments, enabling Linux users to print to otherwise unsupported hardware.

CAVEATS

foo2hiperc requires a Ghostscript installation to convert PostScript input into an intermediate bitmap format before generating the printer-specific output. Its output is binary data tailored for Hiper-compatible printers and is not human-readable. Support is dependent on the specific printer's compatibility with the reverse-engineered Hiper protocol.

DEPENDENCIES

A functional Ghostscript installation is mandatory for foo2hiperc to operate, as it relies on Ghostscript to render PostScript files into an intermediate raster format before conversion to the printer's native language.

TYPICAL USAGE FLOW

foo2hiperc is commonly employed as a backend filter within a print spooling system like CUPS (Common Unix Printing System). A PostScript print job is directed to foo2hiperc, which processes it, and the resulting printer-specific binary data is then sent directly to the printer device, often via a USB or network interface.

HISTORY

The foo2hiperc command is an integral part of the foo2zjs open-source project, initiated by Rick Richardson. This project emerged to address the lack of Linux drivers for various GDI-based laser printers that utilized proprietary, host-based print languages like Zenographics ZjStream. foo2hiperc specifically targets printers communicating via the Hiper protocol. The foo2zjs suite gained significant popularity as it provided a robust open-source solution, allowing Linux users to utilize otherwise unsupported and often more affordable laser printers, thereby filling a crucial gap in printer driver availability, particularly in the early 2000s.

SEE ALSO

gs(1), lp(1), lpr(1), foo2zjs(1), foo2hp(1)

Copied to clipboard