LinuxCommandLibrary

foo2hp

Convert Foomatic data to HP printer format

SYNOPSIS

foo2hp [options] [< infile] [> outfile]

PARAMETERS

-d
    Output depth in bits per pixel (1, 4, or 8). Default is 8.

-e
    Number of error diffusion passes (0-4). Default is 1.

-g
    Grayscale output.

-H
    Height of the image in pixels. Default is the height from the input file.

-i
    Input file name.

-I
    Use as the ICC profile.

-j
    Center the image on the page.

-l
    Left align the image on the page.

-m
    Media size in dots: Letter-816x1056, Legal-816x1344, A4-794x1123, B5-729x1032. Default is Letter.

-n
    Output copies of the image. Default is 1.

-o
    Output file name.

-p x
    Print resolution in dots per inch (dpi). For example, -p 300x300. Default is the highest resolution.

-r
    Right align the image on the page.

-s
    Gamma correction. Default is 1.0.

-u x
    Offset the image by and dots.

-v
    Verbose mode.

-w
    Width of the image in pixels. Default is the width from the input file.

-x
    Print in duplex mode.

-z
    Compression level (0-9). Default is 0 (no compression).

DESCRIPTION

The foo2hp command is a utility that converts the output of the foo2zjs printer driver to Hewlett-Packard's Printer Control Language (PCL).

foo2zjs is an open-source printer driver designed for certain printers using the Zenographics ZjStream page description language. foo2hp acts as a filter, taking the ZjStream output from foo2zjs and translating it into PCL format, which can then be sent to HP printers or other printers that support PCL. This allows users of printers supported by foo2zjs to print to a wider range of devices.

In essence, foo2hp bridges the gap between the foo2zjs driver and printers that communicate using PCL, providing a flexible printing solution.

The typical usage is to pipe the output of a program to foo2zjs, then pipe the output of foo2zjs to foo2hp, and lastly pipe the output of foo2hp to lpr.

CAVEATS

The foo2hp command is dependent on the availability of the foo2zjs driver and relies on its output format. Compatibility issues may arise if there are significant changes in the output format of foo2zjs.

USAGE EXAMPLE

To convert a PostScript file to PCL using ps2pdf, foo2zjs, and foo2hp, and then print it, you might use a command sequence like this:

ps2pdf input.ps - | foo2zjs -r1200x1200 -g1 -m Letter - | foo2hp -p 600x600 -g -n 1 - > out.pcl

lpr out.pcl

COLOR MANAGEMENT

The -I option allows you to specify an ICC profile for color management. This can be important for achieving accurate color reproduction.

HISTORY

The foo2hp command is part of the foo2zjs project, which aims to provide open-source drivers for printers using the ZjStream page description language. It was developed to provide a way to use those printers with systems that primarily support PCL. The foo2zjs project started to provide support for printers that lacked native drivers. foo2hp was then created to extend the compatibility of foo2zjs to PCL-based printing environments.

SEE ALSO

foo2zjs(1), lpr(1), lp(1)

Copied to clipboard