foo2lava-wrapper
Wrap printing jobs for foo2lava printers
SYNOPSIS
foo2lava-wrapper [OPTIONS] [input_file]
PARAMETERS
-r <resolution>
Sets the print resolution, e.g., '600x600' or '1200x600'.
-d <duplex_mode>
Enables duplex (double-sided) printing. Common modes include 'long' (long-edge binding) or 'short' (short-edge binding).
-p <paper_size>
Specifies the paper size, e.g., 'letter', 'a4', 'legal', 'executive', 'env10'.
-c
Forces color printing, if the printer and driver support it. Otherwise, defaults to grayscale.
-m <N>
Prints multiple pages per sheet (N-up printing), where N is the number of pages (e.g., 2, 4, 6, 9, 16).
-s <source_tray>
Selects the paper source tray, e.g., 'auto', 'manual', 'tray1', 'tray2'.
-t <toner_save>
Enables toner save mode. Usually '1' for enabled, '0' for disabled.
-T <text_quality>
Adjusts text print quality. Specific values depend on the driver version.
-C <graphics_quality>
Adjusts graphics print quality. Specific values depend on the driver version.
-O <output_mode>
Sets the output mode, such as 'draft', 'normal', 'best'.
-L <level>
Specifies the PostScript language level to emulate (e.g., '2', '3').
-i <input_file>
Specifies the input PostScript/PDF file. If omitted, input is read from standard input (stdin).
-o <output_file>
Specifies the output LavaFlow file. If omitted, output is written to standard output (stdout).
--foo2lava-options "<options>"
Passes raw, unparsed options directly to the underlying foo2lava binary.
--gs-options "<options>"
Passes raw, unparsed options directly to the Ghostscript (gs) command.
DESCRIPTION
The foo2lava-wrapper is a shell script that acts as a convenient front-end for the foo2lava Ghostscript driver. It simplifies the process of converting PostScript (PS) or Portable Document Format (PDF) files into the proprietary LavaFlow printer language, primarily used by certain Samsung and other compatible laser printers.
This wrapper script automatically handles the invocation of Ghostscript (gs) and passes standard print options, such as resolution, paper size, and duplex settings, directly to the foo2lava driver. It's commonly used in Linux printing environments, particularly as a filter in the Common Unix Printing System (CUPS), to enable compatibility with printers that do not natively support standard languages like PostScript or PCL.
By abstracting the complexities of Ghostscript command-line arguments and foo2lava-specific options, foo2lava-wrapper provides a user-friendly interface for configuring print jobs, making it easier for users and system administrators to manage print output for supported LavaFlow-based printers.
CAVEATS
The foo2lava-wrapper depends on the foo2lava binary and Ghostscript (gs) being installed and accessible in the system's PATH. It is designed for printers that use the proprietary LavaFlow language. Not all options may be supported by every specific printer model or every version of the foo2lava driver. Ensure you have the correct PPD file configured when using this wrapper as a CUPS filter.
USAGE WITH CUPS
In a CUPS environment, foo2lava-wrapper is typically configured as a backend filter. The PPD (PostScript Printer Description) file associated with the printer will define how CUPS passes job options to this wrapper. When a print job is sent, CUPS converts it to PostScript (if necessary) and then pipes it to foo2lava-wrapper, which in turn processes it for the target LavaFlow printer.
DEPENDENCIES
This wrapper script relies on several external components:
Ghostscript (gs): The core PostScript/PDF interpreter and rasterizer.
foo2lava binary: The actual driver that converts Ghostscript output into the LavaFlow language.
Standard Linux utilities (e.g., sed, grep, basename) for script execution.
Ensure these are correctly installed and configured for foo2lava-wrapper to function properly.
HISTORY
foo2lava-wrapper is part of the larger foo2zjs project, which was initiated by Rick Richardson. The project aims to provide open-source drivers for printers that use proprietary page description languages, particularly those based on ZjStream. foo2lava specifically targets printers that use the LavaFlow language, often found in older Samsung laser printers. The wrapper script was developed to simplify the command-line usage of the foo2lava Ghostscript driver, abstracting complex Ghostscript arguments and providing a more intuitive interface for common printing tasks.