foo2oak
Convert foo2zjs printer driver files to Oak
SYNOPSIS
foo2oak [options] < input.ps > output.oak
or
command | foo2oak [options] > output.oak
PARAMETERS
-r <resolution>
Sets the printer resolution in DPI (dots per inch). Common values include 600 or 1200.
-g <width>x<height>
Sets the media size in pixels. For example, 2480x3508 for A4 at 300 DPI. Overrides -p.
-p <paper_size>
Specifies the paper size. Examples: A4, Letter, Legal, Executive. Refer to papersize.h for supported types.
-L <level>
Sets the debug level. A higher number provides more verbose output for troubleshooting.
-n <copies>
Prints the specified number of copies of the document.
-d <duplex>
Enables duplex (two-sided) printing. 1 for short-edge binding, 2 for long-edge binding.
-s <source>
Specifies the paper input source tray (e.g., 1 for auto, 2 for manual feeder).
-c <colorspace>
Selects the color space. 1 for monochrome (black and white), 3 for color.
-t <tumble>
Sets the duplex tumble option. 1 for tumble, 0 for no tumble.
-O <offset>
Sets an output offset value for page positioning.
-u <x_offset>,<y_offset>
Offsets the image on the page by the specified X and Y coordinates in pixels.
-Z
Enables toner save mode, reducing toner consumption at the cost of print quality.
-A
Enables auto-rotation of pages to best fit the selected paper size.
-f
Inserts a form feed character at the end of the print job.
-k
Keeps intermediate temporary files generated during processing for debugging purposes.
-D
Enables raw debug output, showing the unprocessed printer commands.
-X
Swaps the X and Y dimensions (width and height).
-Y
Swaps the Y and X dimensions (height and width). Similar to -X, but can have different behavior depending on context.
DESCRIPTION
foo2oak is a printer driver for the foo2zjs project. It converts Ghostscript output, typically PostScript, into a raw raster format compatible with laser printers using the "Oak" rendering engine. These printers often include specific models from Samsung, Xerox, and Dell.
The command acts as an integral part of the Linux printing system, usually invoked by foomatic-rip or directly by a print spooler like CUPS. It takes PostScript data from standard input, processes it, and outputs the proprietary Oak printer data to standard output, which is then sent to the printer. Its primary purpose is to enable Linux users to print to printers that do not have native Linux drivers, by translating standard print job formats into the specific language understood by the printer hardware.
CAVEATS
foo2oak relies on the Ghostscript engine to render PostScript into a bitmap image, which is then converted to the Oak format. Therefore, issues with Ghostscript (e.g., version compatibility, font rendering) can affect foo2oak's output.
The quality and feature support can vary significantly between different Oak-based printer models due to variations in their firmware and specific command sets. Some advanced printer features might not be fully accessible or properly emulated.
SUPPORTED PRINTERS
foo2oak specifically targets printers that use the "Oak" raster language. This includes various Samsung, Xerox, and Dell laser printers. Users should verify their printer model is supported by consulting the foo2zjs project website or documentation, as support is not universal for all models from these brands.
USAGE WITH CUPS
In a typical Linux printing setup, foo2oak is not invoked directly by the user. Instead, it is configured as the backend filter for a printer queue in CUPS (Common Unix Printing System). When a print job is sent to such a queue, CUPS uses foomatic-rip to pipe the PostScript data through foo2oak, which then sends the processed data to the printer device (e.g., via USB or network).
HISTORY
foo2oak is part of the larger foo2zjs project, an open-source printer driver suite initiated by Rick Richardson. The project aims to provide Linux/UNIX drivers for many inexpensive laser printers that use proprietary raster languages instead of standard PostScript or PCL. The "Oak" engine specific support was developed to extend compatibility to printers utilizing this particular command set, filling a critical gap for users of such hardware.
SEE ALSO
gs(1), foomatic-rip(1), foo2zjs(1), foo2qpdl(1), cupsd(8)