Command WR GET PRINT OPTION

4D Write

WR GET PRINT OPTION

version 2004


WR GET PRINT OPTION (area; option; value1; value2; value3)

ParameterTypeDescription
areaLongint4D Write area
optionLongintOption number
value1NumberValue 1 of the option
value2NumberValue 2 of the option
value3StringValue 3 of the option

Description

The WR GET PRINT OPTION command returns the current value(s) of a print option.

The option parameter enables you to specify the option to get. You can either pass a value or one of the following predefined constants, located in the "WR Print options" theme:

ConstantTypeValue
wr paper optionLongint1
wr orientation optionLongint2
wr scale optionLongint3
wr number of copies optionLongint4
wr paper source optionLongint5
wr pages from optionLongint6
wr pages to optionLongint7
wr color optionLongint8
wr destination optionLongint9
wr double-sided optionLongint11
wr spooler document name optionLongint12

The command returns, in the value1 and (optionally) value2 and value3 parameters, the current value(s) of the specified option. For more information on options and possible values, refer to the description of the WR SET PRINT OPTION command. Note the following specific features of the WR GET PRINT OPTION command:

option = 1 (wr paper option): Returns the name of the current paper in value1 if value2 and value3 are omitted. If only value3 is omitted, the command returns respectively the height and width of the paper in value1 and value2. Use the PRINT OPTION VALUES command to get the name, height and width of all the paper formats offered by the printer.

option = 2 (wr orientation option): Returns 1 (Portrait) or 2 (Landscape). If a different orientation option is used, value1 is set to 0 (value2 and value3 must be omitted).

option = 5 (wr paper source option): In value1, returns the index, in the array of trays returned by the PRINT OPTION VALUES command, of the paper tray used (value2 and value3 must be omitted).

Note: This option can only be used under Windows.

option = 6 and option = 7 (wr pages from option and wr pages to option): If all the pages are printed, the command returns 1 in value1 for wr pages from option and -1 in value1 for wr pages to option(value2 and value3 must be omitted).

option = 8 (wr color option): Returns a code in value1 specifying the mode for handling color: 1=Black and white (monochrome), 2=Color (value2 and value3 must be omitted).

Note: This option can only be used under Windows.

option = 9 (wr destination option): If the current value is not in the predefined list, value1 contains -1 and the system variable OK is set to 1. If an error occurs, value1 and the system variable OK are set to 0. If value1 contains a predefined value different from 1, value3 contains the access path of the printed file. value2 always contains 0.

option = 11 (wr double sided option): Returns 0 (Standard or Single-sided, default value) or 1 (Double-sided) in value1.

If value1 equals 1, value2 may return one of the following values: 0=Left binding (default), 1=Top binding (value3 must be omitted).

Note: This option can only be used under Windows.

option = 12 (wr spooler document name option): Returns the name of the current print document in value3, if it has been defined previously (value1 and value2 receive 0). Otherwise, an empty string is returned.

The system variable OK is set to 1 if the command has been executed correctly; otherwise, it is set to 0.

See Also

PRINT OPTION VALUES, WR SET PRINT OPTION.