foo2hp
Convert Foomatic data to HP printer format
SYNOPSIS
foo2hp [options] [filename]
PARAMETERS
-r
Sets the printing resolution, e.g.,
-r 600x600
.
-g
Applies gamma correction, e.g.,
-g 1.8
.
-d
Enables duplex (two-sided) printing.
1
for long-edge binding,
2
for short-edge binding.
-c
Specifies the color mode.
1
for black and white/grayscale,
3
for full color.
-m
Selects the media type, such as
0
for plain paper,
1
for photo paper.
-p
Defines the paper size (e.g.,
0
for A4,
1
for Letter).
-t
Activates toner save mode, which uses less ink/toner.
-s
Chooses the input tray/source.
-T
Sets the text print quality level.
-P
Sets the photo print quality level.
-k
Forces printing to use black ink only (K-only mode).
-o
Specifies an output file instead of standard output.
-u
Displays usage information and exits.
-v
Prints the version information and exits.
DESCRIPTION
foo2hp is a
Ghostscript
driver for printers that use the
HP Inkjet Photo (HP-IJP)
language, specifically supporting models like the
HP DeskJet 1200C
and
HP Color Inkjet cp1700
. It is an essential component of the
foo2zjs
project, which provides open-source drivers for various proprietary printer languages.
The primary function of
foo2hp
is to convert
PostScript
data, typically generated by
Ghostscript (gs)
, into the native HP-IJP format that these specific HP inkjet printers understand. This enables Linux users to print to these devices, bridging the gap between standard PostScript output and the printer's proprietary language.
It typically operates as part of a printing pipeline, receiving PostScript input from
Ghostscript
via a pipe, processing it, and then sending the formatted data either to standard output (which can then be piped to a print spooler like
lpr
or a device file) or directly to an output file. This allows for fine-grained control over print quality, resolution, paper handling, and color management.
CAVEATS
foo2hp is specifically designed for older HP Inkjet Photo printers that use the
HP-IJP
language, such as the
HP DeskJet 1200C
and
HP Color Inkjet cp1700
. It will
not
work with modern HP printers that typically use
PCL
,
PostScript
, or
HP PCL3 GUI
.
Its functionality relies on
Ghostscript
to provide the initial PostScript input, making it part of a larger printing workflow rather than a standalone printer driver. As a component of the
foo2zjs
project, users might need to install the entire suite for full functionality or proper integration with CUPS.
TYPICAL WORKFLOW
foo2hp is commonly used in a pipeline with
Ghostscript
and a print spooler like
lpr
:
gs -q -dBATCH -dNOPAUSE -sDEVICE=foo2hp -sOutputFile='|foo2hp -r 600x600 -p 0 -c 3 -' - | lpr
This command chain takes a PostScript input (implicitly from stdin due to
gs
options), processes it with
Ghostscript
using the
foo2hp
device, pipes the output through
foo2hp
with specific options, and then sends the final printer-ready data to the default printer via
lpr
.
INTEGRATION WITH CUPS
For modern Linux distributions,
foo2hp
is often integrated with the
Common Unix Printing System (CUPS)
. CUPS can be configured to use
foo2hp
as a filter in its printing pipeline, abstracting the command-line usage from the end-user. This provides a user-friendly way to manage and print to supported HP-IJP printers through graphical interfaces or standard printing dialogues.
HISTORY
foo2hp emerged as part of the broader
foo2zjs
project, initiated by
Rick Richardson
. The project aimed to provide open-source drivers for various budget-friendly printers that utilized proprietary page description languages (PDLs) instead of standard
PostScript
or
PCL
.
foo2hp
was specifically developed to support HP printers using the
HP Inkjet Photo (HP-IJP)
protocol, which was a common language for certain HP inkjet models in the late 1990s and early 2000s, such as the
HP DeskJet 1200C
and
HP Color Inkjet cp1700
.
Its development allowed Linux and Unix users to gain printing capabilities for these specific devices, which would otherwise have been unsupported due to the proprietary nature of their communication protocols. It represents a significant effort in the open-source community to ensure hardware compatibility.