HPlogo Using the X Window System > Chapter 10 Printing and Screen Dumps

Printing Screen Dumps

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Glossary

 » Index

Before you can print the screen dump, you need to ensure that your printer is connected and talking to your computer.

Refer to the system administrator manual(s) for your system if you need to:

  • Connect the printer to your computer.

  • Create a device file for the printer on your computer.

  • Run the print spooler.

Printing Screen Dumps with `xpr'

xpr prints a screen dump that has been produced by xwd.

   xpr [options] filename

where options are:

-scale scale

Specifies a multiplier for pixel expansion. The default is the largest that will allow the entire image to fit on the page.

-density dpi

Specifies the dots per inch for the printer.

-height inches

Specifies the maximum height in inches of the window on the page.

-width width

Specifies the maximum width in inches of the window on the page.

-left inches

Specifies the left margin in inches. The default is centered.

-top inches

Specifies the top margin in inches. The default is centered.

-header caption

Specifies a caption to print above the window.

-trailer caption

Specifies a caption to print below the window.

-landscape

Prints the window in landscape mode. The default prints the long side of the window on the long side of the paper.

-portrait

Prints the window in portrait mode. The default prints the long side of the window on the long side of the paper.

-rv

Reverses black and white from the original screen.

-compact

Provides efficient printer directions for a window with lots of white space (PostScript printers only).

-output filename

Specifies a file to store the output in.

-append filename

Adds the window to the end of an existing file.

-noff

Specifies that the window should appear on the same page as the previous window. Used with -append.

-split n

Prints the window on n pages. Not applicable to HP printers.

-device dev

Specifies the printer to use.

ljet

HP LaserJet series, HP ThinkJet, HP QuietJet, RuggedWriter, HP2560 series, HP2930 series, other PCL devices.

pjet

HP PaintJet (color mode).

pjetxl

HP PaintJet XL.

ln03

DEC LN03.

la100

DEC LA100.

ps

PostScript printers.

pp

IBM PP3812.

-cutoff level

Specifies intensity for converting color to monochrome for printing on a HP LaserJet printer.

-noposition

Bypasses header positioning, trailer positioning, and image positioning commands for the HP LaserJet and HP PaintJet printers.

filename

Specifies the xwd file to print.

For example, suppose you want to print a xwd file named myfile that you previously created with xwd. You want to print the file on a HP LaserJet printer in portrait mode with black and white the reverse of the original xwd file.

   xpr -device ljet -portrait -rv myfile | lp -oraw Return

Reversing colors is often used when preparing illustrations for documents. The original illustration can be done in white with a black background, which is easy to see on computer displays, but reversed to give a black drawing on a white background, which is common in printed material.

Moving and Resizing the Image on the Paper

You may not always want to have the image print exactly in the same size or location as the default choices place it.

Sizing Options

The three sizing options for xpr are:

-scale

Each bit of the image is translated into a grid of the size you specify. For example, if you specify a scale of 5, each bit in the image is translated into a 5 by 5 grid. This is an easy way to increase the size without refiguring the height and width.

-height

The maximum height in inches of the image on the page.

-width

The maximum width in inches of the image on the page.

The actual printed size could be smaller than -height and -width if other options, such as the orientation ones, conflict with them.

Location Options

The two location options for xpr are:

-left

The left margin in inches.

-top

The top margin in inches.

If -left is not specified, the image is centered left-to-right. If -top is not specified, the image is centered top-to-bottom.

Orientation Options

The two orientation options to xpr are:

-landscape

The image is printed so that the top of the image is on the long side of the paper.

-portrait

The image is printed so that the top of the image is on the short side of the paper.

If neither option is specified, xpr will position the image so that the long side of the image is on the long side of the paper. However, you can force it to print either in landscape mode or portrait mode by using the appropriate option.

Unless told otherwise by the sizing options, xpr makes the image as big as necessary to fit in the orientation specified.

Printing Multiple Images on One Page

xpr normally prints each image on a separate page. The -noff option is used to print more than one image on a page.

Printing Color Images

Use the device name pjet to direct output to a HP PaintJet printer.

For example, the following command prints a xwd file named myfile on a HP PaintJet printer.

   xpr -device pjet myfile Return

Color images printed on a HP LaserJet printer will be in black and white instead of color.

xpr prints only in black and white, no shades of gray.

If your original color image contained many colors of the same intensity, the HP LaserJet printer version may be all light or all dark. If that happens, use the -cutoff option to change the mapping of color intensities. Anything above the cutoff value is white and anything below is black. Note that the default cutoff value is 50 percent.

If you want color images to print in shades of gray on your LaserJet, use the Starbase utility pcltrans instead of xpr. Refer to the Starbase documentation for information.

© 1995 Hewlett-Packard Development Company, L.P.