foo2lava
Convert Foo2zjs printer data to raster
SYNOPSIS
foo2lava [options] < infile > outfile
foo2lava [options] infile [> outfile]
PARAMETERS
-r <xres>x<yres>
Sets the desired resolution for printing in dots per inch (DPI), e.g., -r 600x600.
-g <gamma>
Applies gamma correction to the output. A value of 1.0 is no correction.
-d <duplex_mode>
Controls duplex (two-sided) printing. Common modes include 0=off, 1=long-edge binding, 2=short-edge binding.
-m <media_type>
Specifies the media type (e.g., plain, glossy) to adjust print characteristics.
-c <color_mode>
Sets the color mode: 0 for monochrome (grayscale) and 1 for color printing.
-p <paper_size>
Defines the paper size for the output (e.g., A4, Letter, Legal).
-L
Enables landscape orientation for the print job.
-q <quality>
Adjusts the print quality setting. Specific values depend on the printer model.
-V
Prints the version number of foo2lava and exits.
DESCRIPTION
foo2lava is a Linux command-line utility designed to convert printer-specific data streams, particularly those generated for "Lava" family Zenographics ZjStream-based printers, into a standard PostScript format. Many Lexmark, Samsung, Dell, and HP printers use the ZjStream protocol. This conversion is crucial for printing on Linux systems, as it allows the raw printer data, which is often unintelligible to standard rendering engines, to be processed by widely supported tools like Ghostscript (gs).
The typical workflow involves an application generating ZjStream data, foo2lava converting it to PostScript, and then Ghostscript rendering the PostScript into a bitmap image suitable for the printer or display. foo2lava works as part of the foo2zjs driver suite, providing open-source support for a range of otherwise proprietary printer protocols. It is commonly used within CUPS (Common Unix Printing System) as a filter.
CAVEATS
foo2lava requires input in the specific raw ZjStream "Lava" printer data format; it cannot process other printer languages like PCL or XPS directly. The output is PostScript, which then requires a PostScript interpreter like Ghostscript for rendering to a printer's native format or a display. The effectiveness and feature support can vary depending on the specific printer model and its firmware version. It is designed for specific Zenographics-based printers and is not a universal printer driver.
CUPS INTEGRATION
foo2lava is commonly used as a filter within the Common Unix Printing System (CUPS). When a print job is submitted, CUPS can be configured to use foo2lava to convert the printer's native data stream into PostScript, which Ghostscript then processes before sending the final rasterized image to the printer.
DEPENDENCIES
The primary dependency for foo2lava's output processing is Ghostscript. While foo2lava generates PostScript, Ghostscript is essential for rendering that PostScript into a format that the printer can understand (a bitmap) or for displaying it.
HISTORY
foo2lava is a component of the larger foo2zjs project, initiated by Rickard E. (Rick) Faith. The project's primary goal was to provide open-source printer drivers for a range of consumer-grade laser printers from manufacturers like Lexmark, Samsung, Dell, and HP, which utilized the proprietary Zenographics ZjStream protocol and lacked official Linux support. Developed out of a need to overcome these proprietary barriers, foo2lava specifically targets the "Lava" subset of ZjStream printers. Its development has contributed significantly to improving Linux's interoperability with a class of printers that would otherwise be unsupported, and it has been widely adopted and integrated into various Linux distributions' printing systems, most notably CUPS.
SEE ALSO
foo2zjs-wrapper(1), foo2hp(1), foo2xq(1), foo2qp(1), ghostscript(1), cupsd(8)