xpr Command

Purpose

Formats a window dump file for output to a printer.

Syntax

xpr-append FileName -noff ] |  -output FileName ] [  -landscape -portrait ] [  -compact ] [  -cutoff Level ] [  -density Dpi ]  [  -gray } ] [  -header String ] [  -height Inches ] [  -left Inches ] [  -noposition ] [  -plane PlaneNumber ] [  -psfig ] [  -report ] [  -rv ] [  -scale Scale ] [  -split Number ] [  -top Inches ] [  -trailer String ] [  -width Inches ] [  -device Device ] [  ImageFile ]

Description

The xpr command uses a window dump file produced by the xwd utility as input and formats the dump file for output on all printers supported by the hardware. If you do not specify a file argument, the xpr command uses standard input. By default, the xpr command prints the largest possible representation of the window on the output page.

The xpr command options allow you to add headers and trailers, specify margins, adjust the scale and orientation, and append multiple window dumps to a single output file. Output is to standard output unless the -output flag is specified.

Flags

Item Description
-append FileName Specifies a file name previously produced by the xpr command to which the window is to append. (This flag is not supported on PostScript printers.)
-compact Uses simple run-length encoding for compact representation of windows with many white pixels. This flag compresses white space but not black space, so it is not useful for reverse-video windows.

(This flag supports PostScript, LIPS II+, and LIPSIII output only.)

-cutoff Level Changes the intensity level where colors are mapped to black or white for monochrome output on a LaserJet printer. The Level variable is expressed as a percentage of full brightness. Fractions are acceptable.
-device Device Specifies the device on which the file prints. The xpr command supports the following printers:
3812 or pp
IBM® PP3812
4207
Proprinter
5201
IBM Quietwriter 1 model 2
5202
IBM Quietwriter 2
jprinter
IBM Japanese Printer (Japanese data stream)
ljet
HP LaserJet and IBM Laser Printer
ps
PostScript printers (this is the default)
lips2
Canon LaserShot LIPS II+ mode
lips3
Canon LaserShot LIPS III mode
-density Dpi Indicates the dots-per-inch (dpi) density that the HP printer uses. 300 dpi is the default. Allowable densities are 300, 150, 100, and 75 dpi.
-gray Number Specifies gray-scale conversion to a color image, rather than mapping to a black-and-white image. The Number variable must be one of the following:
2
2 x 2 conversion
3
3 x 3 conversion
4
4 x 4 conversion

This conversion doubles, triples, or quadruples, respectively, the effective width and height of the image.

Note: This option is valid only for PostScript printers.
-header String Specifies a header string to print above the window.
-height Inches Specifies the maximum height of the page.
ImageFile Contains the captured bitmap of the image. If you do not specify the ImageFile parameter, the xpr command uses standard input.
-landscape Forces the window to print in landscape mode. (The display is laid out with the windows being wider than they are high.) By default, a window prints so that its longest side follows the long side of the paper.
-left Inches Specifies the left margin in inches. Fractions are acceptable. By default, this flag prints the window on the center of the page.
-noff When specified in conjunction with the -append flag, the window is displayed on the same page as the previous window. (This flag is not supported on PostScript printers.)
-noposition Causes the header, trailer, and image positioning command generation to be bypassed for the LaserJet printer.
-output FileName Specifies an output file name. If you do not specify this option, the xpr command uses standard output.
-planePlaneNumber Specifies which bit plane to use in an image. The default uses the entire image and maps values into black and white based on color intensities. This option is not supported for the LaserJet printer.
-portrait Forces the window to print in portrait mode. (The display is laid out with the windows being higher than they are wide.) By default, a window prints so that its longest side follows the long side of the paper.
-psfig Suppresses translation of the PostScript picture to the center of the page.
-report Prints out statistics to standard error about the window ImageFile parameter.
-rv Forces the window to print in reverse video.
-scale Scale Affects the size of the window on the page. PostScript printers are able to translate each bit in a window pixel map into a grid of a specified size. For example, each bit might translate into a 3 x 3 grid. To specify a 3 x 3 grid, enter -scale 3. By default, a window prints with the largest scale that fits on the page for the specified orientation. If you do not specify a device, the aspect ratio can vary.
-split Number Splits a window into several pages. This might be necessary for very large windows that would otherwise cause the printer to overload and print the page in an obscure manner. (This flag is not supported on PostScript or HP Laserjet printers.)
-top Inches Specifies the top margin for the window in inches. Fractions are acceptable. By default, this flag prints the window on the center of the page.
-trailer String Specifies a trailer string to print below the window.
-width Inches Specifies the maximum width of the page.
Note: The 4207, 5201, and 5202 printers' images must be recorded by the xwd utility in XYPixmap or XYBitmap format. XYPixmap images are converted into bitmaps using a thresholding algorithm. For the HP Laserjet printer, multiplane images must be recorded in ZPixmap format. Single plane images may be either XYPixmap, XYBitmap, or ZPixmap formats.