PCLTRANS(1)
NAME
pcltrans − translate a Starbase bitmap file into PCL raster graphics format.
SYNOPSIS
pcltrans [ options ] <file>
HP-UX COMPATIBILITY
Level: HP-UX/STANDARD
Origin: HP
DESCRIPTION
The command pcltrans translates bitmap (raster graphics) data from a file (a starbase formatted bitmap file) into Printer Command Language (PCL) raster graphics format.
If input is redirected through a pipe a temporary file will be created for use by the internal pcltrans formatter.
Note that output is a series of PCL commands which consist of binary data and escape sequences. Since output is to standard out, pcltrans should be used as a filter with output redirected to a file or to some other process such as the lp spooler.
Unless modified by options, the output includes PCL commands to set printer resolution, begin raster graphics mode, transfer raster graphics by rows, end raster graphics mode, and the final byte of output is a formfeed. In addition rgb pixels are converted to shades of gray based on their intensity values. Pixels are not expanded, the output is left to right across the long dimension of the paper, and 300 dots per inch resolution is chosen.
The following options are recognized by pcltrans.
−k Do not print the background color. Default is to print the background color.
−bbcol Background color table index for printing a single plane. Default is 0. This option only has effect when printing a single plane as specified with the -p option.
−c Each pixel with a nonzero RGB value is converted to black. Default is conversion to the nearest available shade of gray. This option has a different effect if the -C option is also used (yields PRIMARY).
−C Each pixel is converted to the appropriate output color value using an error diffusion algorithm. This option also changes the effect of the -c option. Not all PCL printers support color mode.
−c-C Each pixel is converted to the nearest PRIMARY color (red, green, blue, cyan, magenta, yellow, white, or black).
−eexp Pixel expansion - indicates the expansion for each pixel in the bitmap and ranges from 1 to 8. For example, to expand from a single pixel to a 4x4 cell, the expansion parameter is set to 4. Default is 1.
−ffcol Foreground color table index for printing a single plane. Default is 1. This option only has effect when printing a single plane as specified with the -p option.
−llength Length of the paper in inches. Default is 10.5 inches.
−R Output print orientation is left to right across the width of the paper (analogous to portrait mode on the Laserjet printer). Default is left to right across the length of the paper. Raster rotation is done in pcltrans rather than changing printer modes.
−pplane Bitmap plane to be printed when only a single plane is to be printed. Default is to print a full depth bitmap. If the plane specified in this option is a non-negative number and is not contained in the bitmap file, the pcltrans formatter will exit with error. If the plane specified in this option is negative the formatter will default to all planes.
−rres Resolution of the printer in dots per inch. The actual resolution is printer dependent and will be the highest resolution available =< res. Default is 300 dots per inch.
−s Raster graphics is started at the current printer cursor position. The first command in the output is Ec*t#R (set graphics resolution) followed by Ec*r1A (start raster graphics). Next follows individual rows of raster data prefixed with Ec*b#W[raster] (transfer raster graphics), and the last command in the output is Ec*rB (terminate raster graphics.
−wwidth Width of paper in inches. Default is 8.0 inches.
EXAMPLE
A typical case is formatting a file for output at 150 dots per inch resolution to a Laserjet Plus printer. The desired plot orientation is left to right across the width of the page The output in this example is then piped to lp in raw mode so that no processing of the data is done by lp.
pcltrans -r150 -R myfile | lp -oraw
SEE ALSO
HP-UX Reference,lp(1M), bitmapfile(5).
Starbase Reference,bitmap_to_file(3G).
Starbase Device Drivers Library, "PCL Formatter".
Starbase Graphics Techniques, "Storing and Printing Images".
Hewlett-Packard Company — May 11, 2021