Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xpr(1) — DeltaWindows 1.3.3 Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

xpr − print an X window dump. 

SYNTAX

xpr [options] [filename]

DESCRIPTION

xpr takes as input a window dump file produced by xwd and formats it for output on PostScript printers, the DEC LN03 or LA100, the IBM PP3812 page printer, the HP LaserJet (or other PCL printers), or the HP PaintJet.  If you do not supply a filename, standard input is used.  By default, xpr prints the largest possible representation of the window on the output page.  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 sent to standard output unless you specify -output filename. 

OPTIONS

xpr accepts the following options:

-device printer_device
Specifies the device on which the file is to be printed.  Currently the following printers are supported:

ln03Digital LN03. 

la100Digital LA100. 

ljetHP LaserJet series and other monochrome PCL devices, such as ThinkJet, QuietJet, RuggedWriter, HP2560 series, and HP2930 series printers. 

pjetHP PaintJet (color mode). 

pjetxlHP PaintJet XL Color Graphics Printer (color mode). 

ppIBM PP3812. 

psPostScript printer. 

As of Release 5, the default is ps (PostScript).  (In prior releases, the default printer is the LN03.)  -device lw (Apple LaserWriter) is equivalent to -device ps and is provided only for backwards compatibility. 

-scale scale
Affects the size of the window on the page.  The PostScript, LN03, and HP 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×3 grid.  This is specified by -scale 3.  By default, a window is printed with the largest scale that fits onto the page for the specified orientation. 

-height inches
Specifies the maximum height of the page.

-width inches
Specifies the maximum width of the page.

-left inches
Specifies the left margin in inches. Fractions are allowed. By default, the window is centered on the page.

-top inches
Specifies the top margin for the picture in inches.  Fractions are allowed.  By default, the window is centered on the page.

-header header
Specifies a header string to be printed above the window.  Default is no header.

-trailer trailer
Specifies a trailer string to be printed below the window.  Default is no trailer.

-landscape
Prints the window in landscape mode.  By default, a window is printed such that its longest side follows the long side of the paper.

-portrait
Prints the window in portrait mode.  By default, a window is printed such that its longest side follows the long side of the paper.

-rvReverses the foreground and background colors. 

-compact
Compresses white pixels on PostScript printers.

-output filename
Specifies an output filename.  If this option is not specified, standard output is used.

-append filename
Specifies a filename previously produced by xpr to which the window contents are to be appended. 

-noffWhen specified in conjunction with -append, the window appears on the same page as the previous window. 

-split n
Allows you to split a window onto several pages.  This might be necessary for large windows that would otherwise cause the printer to overload and print the page in an obscure manner.

-plane number
Specifies which bit plane to use in an image.  The default is to use the entire image and map values into black and white based on color intensities. The plane option is not available for PostScript printers (-device ps). 

-grey  2 | 3 | 4
Uses a simple 2×2, 3×3, or 4×4 grey scale conversion on a color image, rather than mapping to strictly black and white.  This doubles, triples, or quadruples the effective width and height of the image. The grey option is not available for PostScript printers (-device ps). 

-psfigSuppress translation of the PostScript picture to the center of the page. 

-density dpi
Indicates what dot-per-inch density should be used by the HP printer.

-cutoff level
Changes the intensity level where colors are mapped to either black or white for monochrome output on a LaserJet printer. The level is expressed as a percentage of full brightness.  Fractions are allowed. 

-noposition
Causes header, trailer, and image positioning command generation to be bypassed for LaserJet, PaintJet, and PaintJet XL printers.

-gamma correction
Changes the intensity of the colors printed by PaintJet XL printers.  The correction is a floating point value in the range 0.00 to 3.00.  Consult the operator’s manual to determine the correct value for the specific printer. 

-render algorithm
Allows PaintJet XL printers to render the image with the best quality versus performance tradeoff. Consult the operator’s manual to determine which algorithms are available. 

-slideAllows overhead transparencies to be printed using the PaintJet and PaintJet XL printers. 

LIMITATIONS

The current version of xpr can generally print out on the LN03 most X windows that are not larger than two-thirds of the screen.  For example, it will be able to print out a large emacs window, but it will usually fail when trying to print out the entire screen.  The LN03 has memory limitations that can cause it to incorrectly print very large or complex windows.  The two most common errors encountered are “band too complex” and “page memory exceeded.” In the first case, a window may have a particular band (a row six pixels deep) that contains too many changes (from black to white to black).  This will cause the printer to drop part of the line and, possibly, parts of the rest of the page.  The printer will flash the number ‘1’ on its front panel when this problem occurs.  A possible solution to this problem is to increase the scale of the picture, or to split the picture onto two or more pages.   The second problem, “page memory exceeded,” will occur if the picture contains too much black, or if the picture contains complex half-tones such as the background color of a display.  When this problem occurs the printer will automatically split the picture into two or more pages.  It may flash the number ‘5’ on its front panel.  There is no easy solution to this problem.  It will probably be necessary to either cut and paste, or rework the application to produce a less complex picture. 

There are several limitations on the use of xpr with the LA100: the picture will always be printed in portrait mode, there is no scaling, and the aspect ratio will be slightly off. 

Support for PostScript output currently cannot handle the -append, -noff, or -split options. 

The -compact option is supported only for PostScript output.  It compresses white space but not black space, so it is not useful for reverse-video windows. 

For color images, should map directly to PostScript image support. 

HP PRINTER SPECIFICS

If no -density is specified on the command line, 300 dots per inch will be assumed for ljet and 90 dots per inch for pjet.  Allowable density values for a LaserJet printer are 300, 150, 100, and 75 dots per inch.  Consult the operator’s manual to determine densities supported by other printers. 

If no -scale is specified, the image will be expanded to fit the printable page area. 

The default printable page area is 8×10.5 inches. Other paper sizes can be accommodated using the -height and -width options. 

Note that a 1024×768 image fits the default printable area when processed at 100 dpi with scale=1; the same image can also be printed using 300 dpi with scale=3, but will require that considerably more data be transferred to the printer.

xpr may be tailored for use with monochrome PCL printers other than the LaserJet.  To print on a ThinkJet (HP2225A), xpr could be invoked as: % xpr -density 96 -width 6.667 filename or for black-and-white output to a PaintJet: % xpr -density 180 filename The monochrome intensity of a pixel is computed as 0.30∗R + 0.59∗G + 0.11∗B.  If a pixel’s computed intensity is less than the -cutoff level, it will print as white.  This maps light-on-dark display images to black-on-white hardcopy.  The default cutoff intensity is 50% of full brightness.  Example: specifying -cutoff 87.5 moves the white/black intensity point to 87.5% of full brightness. 

A LaserJet printer must be configured with sufficient memory to handle the image.  For a full page at 300 dots per inch, approximately 2MB of printer memory is required. 

Color images are produced on the PaintJet at 90 dots per inch.  The PaintJet is limited to 16 colors from its 330 color palette on each horizontal print line.  xpr will issue a warning message if more than 16 colors are encountered on a line.  xpr will program the PaintJet for the first 16 colors encountered on each line and use the nearest matching programmed value for other colors present on the line. 

Specifying the -rv (reverse video) option for the PaintJet will cause black and white to be interchanged on the output image.  No other colors are changed. 

Multiplane images must be recorded by xwd in ZPixmap format.  Single plane (monochrome) images may be in either XYPixmap or ZPixmap format. 

Some PCL printers do not recognize image positioning commands.  Output for these printers will not be centered on the page and header and trailer strings may not appear where expected. 

The -gamma and -render options are supported only on the PaintJet XL printers. 

The -slide option is not supported for LaserJet printers. 

The -split option is not supported for HP printers. 

SEE ALSO

xwd, xdpr, xwud, X. 

COPYRIGHT

Copyright 1988, Massachusetts Institute of Technology. 

Copyright 1986, Marvin Solomon and the University of Wisconsin. 

Copyright 1988, Hewlett-Packard Company. 

See X for a full statement of rights and permissions. 

AUTHORS

Michael R. Gretzinger, MIT Project Athena;
Jose Capo, MIT Project Athena (PP3812 support);
Marvin Solomon, University of Wisconsin;
Bob Scheifler, MIT;
Angela Bock and E. Mike Durbin, Rich Inc. (greyscale);
Larry Rupp, Hewlett-Packard (HP printer support).

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026