WPPS Windows Printing Setup File

LANSA Technical

WPPS (Windows Printing Setup File)

The Windows Printing Setup File specifies the file, including the full path, which contains the associated printer settings.  These settings will be used to initialize the printer dialog. If the printer dialog is not displayed these settings will be automatically sent to the printer.  The default printer settings on the PC will be used if WPPS is not specified.  If WPPS is specified the default printer setting will be used for any parameters not specified in the file.

When you specify the WPPS parameter, you must also specify the WPPN parameter. Even if you display the printer dialog, WPPN is required so that the dialog can be initialized with the correct default settings.

A new file can be specified at any time thus allowing the user to use different settings for different print jobs (reports, etc) without having to display the printer dialog every time.

This parameter is not passed to (inherited by) a server system.  When printing from a server in a client/server environment the file name can be exchanged to the server when the print function is called or the file can specified in the server function.

The following printer settings may be specified.  Some settings may not be relevant for the selected printer, in which case they will be ignored by the printer.

Note: The WPXX and PRTR parameters are X_RUN and should not be specified in this file.

PGOR= Page Orientation

Value

Description

P

Portrait

L

Landscape

 

 

DPXP= Duplex printing

Value

Description

N

Normal (non-duplex)

H

Duplex over horizontal (flip over the long edge of the page)

V

Duplex over vertical (flip over the short edge of the page)

 

 

COLR= Color printing

Value

Description

C

Colour

M

Monochrome

 

 

COPY= Number of copies

PSIZ= Paper Size

Value

Description

LETTER

Letter, 8 ½ by 11-inches

LEGAL

Legal 8 ½ by 14 inches

A4

A4 sheet, 210 x 297 millimeters

A3

A3 sheet, 297 by 420 millimeters

xxx

xxx is a numeric value defined by the Microsoft Visual C runtime which represents a specific paper size. The complete list of values may be obtained from Microsoft's MSDN library at:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd319099%28v=vs.85%29.aspx
For example A4 paper size is named DMPAPER_A4 and has the value 9. So use PSIZ=9.

Alternatively, see below for instructions on how to retrieve printer specific values.

 

 

PSRC= Paper Source

Value

Description

A

Auto

L

Lower tray

M

Middle tray

xxx

xxx is a numeric printer specific value. See below for instructions on how to retrieve printer specific values.

 

 

QLTY= Print Quality

Value

Description

H

High

M

Medium

L

Low

D

Draft

xxx

xxx is a numeric printer specific value which specifies the number of dots per inch (DPI). See below for instructions on how to retrieve printer specific values.

 

 

COLL= Collation

Value

Description

Y

Collate when printing multiple copies

N

Do not collate when printing multiple copies

 

 

PTYP= Paper Type

Value

Description

P

Plain paper

G

Glossy paper

T

Transparent film

xxx

xxx is a numeric printer specific value. See below for instructions on how to retrieve printer specific values.

 

 

FNAM= Form Name

See below for instructions on how to retrieve printer specific values.

Printer specific values can be obtained by running the application with WPPD=E and trace settings ITRO=Y ITRL=9 and ITRM set to a value large enough to log the required tracing information.  Enter the required values into the print dialog.  The values returned by the print dialog will be logged in the trace file. Only values that are relevant to the current printer are logged.  Open the trace file and search for the phrase "Printer Details". The following is an example of the trace output:

MESSAGE        : Printer Details for  \\syd1\HP LaserJet 4050 Series

MESSAGE        : Printer Details...  PGOR=1 DPXP=1 COLR=2 COPY=2 PSIZ=9 PSRC=2 QLTY=600

 

Example of a printer setup file

Example 1:

PGOR=P

DPXP=V

COPY=4

 

Example 2:

PGOR=L

DPXP=N

COLR=C

PSIZ=33