LinuxCommandLibrary

foo2qpdl

Convert Ghostscript output to QPDL for printers

SYNOPSIS

foo2qpdl [options] [file.ps]

PARAMETERS

-r <res>
    Sets the print resolution in dots per inch (DPI), e.g., 600 for 600x600 DPI.

-d <duplex>
    Enables duplex (two-sided) printing. 1 for long-edge binding, 2 for short-edge binding. Requires printer support.

-p <paper>
    Specifies paper size. Common values include 0=Letter, 1=Legal, 2=A4, 3=Executive, 4=B5(JIS), 5=A5, 6=C5_Env, 7=DL_Env, 8=B5_Env, 9=Monarch_Env, 10=Comm_Env.

-m <media>
    Sets media type. Common values include 0=Plain, 1=Glossy, 2=Transparency, 3=Bond, 4=Labels, 5=Envelope, 6=CardStock, 7=Preprinted, 8=Colored, 9=Light, 10=Heavy.

-s <source>
    Selects paper source/tray. 0=Auto, 1=Tray1 (main tray), 2=Manual Feed, 3=Tray2 (optional tray).

-t <type>
    Sets output type. 0 for grayscale, 1 for color (if printer supports color QPDL).

-c <copies>
    Prints the specified number of copies.

-u <x_offset>
    Adjusts the image X-offset in dots.

-l <y_offset>
    Adjusts the image Y-offset in dots.

-C <gamma>
    Sets the printer gamma correction value (0-100). Higher values lighten the image.

-G <gamma>
    Alternative gamma correction setting (0-100).

-b <bits>
    Sets the bits per pixel for output (e.g., 1 for monochrome, 8 for grayscale).

-D
    Enables debugging output to stderr, useful for troubleshooting.

-L
    Forces landscape orientation.

-P
    Forces portrait orientation.

-W
    Forces wide format, adjusting output for wider paper sizes.

-A
    Enables automatic paper selection.

-K
    Keeps temporary files generated during processing for inspection.

-V
    Displays version information for foo2qpdl.

DESCRIPTION

foo2qpdl is a GPL Ghostscript filter that converts PostScript into a printer-specific raster format for printers that use the Quick Printer Description Language (QPDL). These are typically 'host-based' or 'Windows-only' HP LaserJet printers, such as the HP LaserJet P1005, P1006, P1007, P1008, P1505, and P1505n, among others. These printers do not understand standard printer languages like PCL or PostScript directly; instead, they rely on the host computer to render the print job into a proprietary raster format.

foo2qpdl fills this gap for Linux and Unix-like operating systems, allowing users to print to these devices. It acts as a crucial component in the CUPS (Common Unix Printing System) printing pipeline, typically receiving PostScript output from applications or Ghostscript itself, processing it, and sending the QPDL-formatted data to the printer.

CAVEATS

foo2qpdl is specifically designed for printers using the QPDL protocol, primarily certain HP LaserJet models. It will not work with printers that use standard printer languages like PCL, PostScript, or other proprietary formats (e.g., ZJS, PCLm). Due to the host-based nature of these printers, some advanced printer features might not be fully supported by the driver, and performance may vary depending on the host system's processing power.

INTEGRATION WITH CUPS

In a typical Linux printing setup, foo2qpdl is configured as a filter within CUPS. When a print job is sent, CUPS passes the PostScript data through Ghostscript (gs), which then pipes its output to foo2qpdl. foo2qpdl processes this data, converts it to the QPDL raster format, and sends the resulting binary stream directly to the printer device, usually via USB.

INPUT AND OUTPUT

The expected input for foo2qpdl is PostScript data, typically generated by Ghostscript or applications. Its output is a raw binary stream in the proprietary QPDL format, which is then sent directly to the printer hardware.

HISTORY

foo2qpdl is part of the larger foo2zjs project, an open-source suite of GPL Ghostscript drivers for printers that use ZjStream (ZJS) and other proprietary languages. The project was initiated by Rick S. P. Holt, who reverse-engineered the protocols to enable Linux support for these otherwise unsupported 'host-based' or 'Windows-only' printers. foo2qpdl specifically addresses the QPDL protocol used by certain HP LaserJet P1000/P1500 series printers, filling a critical void in open-source printer driver availability for these devices.

SEE ALSO

gs(1), lp(1), lpr(1), cupsd(8), foo2zjs(1), foo2oak(1), foo2lava(1)

Copied to clipboard