LinuxCommandLibrary

foo2oak-wrapper

Convert Ghostscript output to OAK format

SYNOPSIS

foo2oak-wrapper [options] <input_file(s)>
foo2oak-wrapper [options] <input_file> > <output_file>
cat <input_file> | foo2oak-wrapper [options] > <output_file>

PARAMETERS

-r <resolution>
    Sets the print resolution, e.g., 600 or 1200 dpi.

-m <media_size>
    Specifies the media size, such as Letter, A4, Legal, etc.

-d <duplex_mode>
    Configures duplex printing. Common modes include longedge, shortedge, or none.

-p <paper_type>
    Selects the paper type, e.g., plain, glossy, transparency.

-c
    Enables color printing, if supported by the printer and driver.

-o <output_file>
    Redirects the processed printer data to the specified file instead of standard output.

-X <offset_x>
    Sets the X-axis offset for the printed image.

-Y <offset_y>
    Sets the Y-axis offset for the printed image.

-Z
    Forces landscape orientation for printing.

-C <copies>
    Specifies the number of copies to print.

-l <level>
    Sets the debug level for the wrapper or underlying foo2oak driver.

-L <level>
    Specifies the Ghostscript language level to use.

DESCRIPTION

The foo2oak-wrapper is a utility designed to simplify the use of the foo2oak Ghostscript printer driver. foo2oak is a driver developed for printers that utilize the 'Oak Technology' page description language or chipset, similar to how foo2zjs handles ZjStream printers.

This wrapper script acts as an intermediary, taking common printing options and input files, then intelligently invoking the underlying foo2oak driver along with Ghostscript (gs) to convert various input formats (like PostScript or PDF) into a format suitable for an Oak-based printer.

Its primary purpose is to abstract away the complexities of directly calling Ghostscript with the correct foo2oak device and parameters. Users can specify resolutions, paper sizes, duplex modes, and other print job attributes using straightforward command-line options. The wrapper handles the proper syntax and argument passing to gs and foo2oak, streamlining the process of printing to compatible devices, often as part of a CUPS (Common Unix Printing System) setup or for direct file conversion.

CAVEATS

The foo2oak-wrapper command is not a standard part of most Linux distributions. It typically needs to be installed as part of the foo2zjs.org driver suite or compiled from source.

It requires a functional Ghostscript (gs) installation and the foo2oak binary (which is usually generated when compiling the foo2zjs.org drivers).

This driver is specific to printers utilizing the 'Oak Technology' page description language or chipset, and will not work with printers using other languages (e.g., PCL, PostScript, ZjStream, QPDL).

DEPENDENCIES AND INSTALLATION

To use foo2oak-wrapper, ensure you have Ghostscript installed. The foo2oak driver and its wrapper typically need to be compiled and installed from the foo2zjs.org source code package. This often involves downloading the source, running make, and sudo make install to place the binaries and support files in the correct system paths. It's crucial that the foo2oak binary itself is accessible in the system's PATH or within the wrapper's expected location.

HISTORY

The foo2oak-wrapper is part of the foo2zjs.org project, an open-source initiative that provides Linux printer drivers for devices using various proprietary page description languages. The project began with the reverse-engineering of the ZjStream language for HP printers, leading to the foo2zjs driver. Over time, it expanded to support other proprietary languages like QPDL (foo2qpdl), and presumably, Oak Technology's language (foo2oak). These drivers aim to enable Linux users to utilize printers that would otherwise lack native support due to vendor-specific, closed-source protocols.

SEE ALSO

gs(1), cups(8), lp(1), foo2zjs-wrapper(1)

Copied to clipboard