WPrint Procedure (Windows)

Prints the contents of a specified window.

Note:

The content of the graphics window will be printed exactly as shown on the screen. In order to improve visibility, change the color of the background to white.

Usage

WPrint[, window_index]

Input Parameters

window_index — (optional) The index number of the window to be printed. If not specified, then the value of !D.Window is used.

Keywords

Collate — If present and nonzero, enables collating for printers that support this feature.

Color — If present and nonzero, enables color output for printers that support this feature.

Copies — Specifies the number of copies to print; the default value is set to the default value of the current printer.

Duplex — If present and nonzero, enables duplex printing. A positive value specifies horizontal (long side) duplexing; a negative value specifies vertical (short side) duplexing.

Inches — By default, the Xsize and Ysize keywords are specified in centimeters. However, if Inches is present and nonzero, Xsize and Ysize are taken to be inches instead.

Landscape — If present and nonzero, then landscape orientation is used. The default is portrait orientation.

Paper_Size — A string value that determines the size of the paper. Valid string values are:

Letter (default)

Legal

Tabloid

Ledger

Statement

Executive

A3

A4

A5

B4

B5

Folio

Quarto

10x14

11x17

Note

CSheet

DSheet

ESheet

 

Note:

The page dimensions set with this keyword can be overridden with the XSize and YSize keywords.

Portrait — If present and nonzero then portrait orientation is used. This is the default.

Printer_Name — Specifies the name of the print queue to which the graphics should be printed. If no printer name is specified, then the default printer is used.

Note:

If this keyword is not specified, a Print dialog box appears from which you can interactively select a print queue and other options.

Note:

When using the WPRINT procedure with the Printer_Name="\\<printserver>\<printer>" keyword to send the output to a networked printer, you must use three backslashes(\) before the <printserver>. For example:

Printer="\\\<printserver>\<printer>"

To help you to diagnose problems, if the printer specified is not found an error message displays the printer name the OS tried to use.

Quality — A string value that specifies the printer resolution; the default value is set to the default value of the current printer. Possible string values are: High, Low, Medium, and Draft.

Scale_Factor — Specifies a scale factor that affects the entire graphics area. The default value is 1.0, which allows output to appear at its normal size.

Source — A string value that specifies the paper bin from which the paper is fed by default; the default value is set to the default value of the current printer. Possible string values include:

Upper

Middle

Lower

Manual

Auto

Tractor

Cassette

 

XSize, YSize — Specifies the width and height of the output page. By default, these values are specified in centimeters unless the Inches keyword is used.

Discussion

This command allows you to print the contents of a specified window.

Not all output devices support all of the features that can be configured using the WPrint keywords. If you use a keyword to set a feature that is not supported by the output device, WPrint simply ignores that keyword, and no error message is displayed. See your printer’s documentation for a complete list of its features.

Example

WPrint, Printer_Name = 'lz1', /Landscape, Copies=3

See Also

PRINT, PRINTF, WINDOW

The graphics window Control menu includes a command that prints the contents of a graphics window. For information on the Control menu, see the PV‑WAVE User Guide.