version 2004.3 (Modified)
GET PRINT OPTION (option; value1{; value2})
Parameter | Type | Description | |
option | Longint | Option number | |
value1 | Longint | String | Value 1 of the option | |
value2 | Longint | Value 2 of the option |
Description
The 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 "Print options" theme:
Constant | Type | Value |
Paper option | Longint | 1 |
Orientation option | Longint | 2 |
Scale option | Longint | 3 |
Number of copies option | Longint | 4 |
Paper source option | Longint | 5 |
Color option | Longint | 8 |
Destination option | Longint | 9 |
Double sided option | Longint | 11 |
Spooler document name option | Longint | 12 |
Mac spool file format option | Longint | 13 |
Hide printing progress option | Longint | 14 |
The command returns, in the value1 and (optionally) value2 parameters, the current value(s) of the specified option. For more information on options and possible values, refer to the description of the SET PRINT OPTION command. Note the following specific features of the GET PRINT OPTION command:
option = 1 (paper option): returns the name of the current paper in value1 if value2 is omitted. If value2 is passed, 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 (orientation option): returns 1 (Portrait) or 2 (Landscape). If a different orientation option is used, value1 is set to 0.
option = 5 (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 must be omitted).
Note: This option can only be used under Windows.
option = 8 (color option): returns a code in value1 specifying the mode for handling color: 1=Black and white (monochrome), 2=Color.
Note: This option can only be used under Windows.
option = 9 (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 or 5, value2 contains the access path of the printed file.
option = 11 (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.
Note: This option can only be used under Windows.
option = 12 (spooler document name option): returns the name of the current print document in value1, if it has been defined previously. Otherwise, an empty string is returned.
Note: The GET PRINT OPTION command only operates with PostScript printers.
See Also
PRINT OPTION VALUES, SET PRINT OPTION.
System Variables or Sets
The system variable OK is set to 1 if the command has been executed correctly; otherwise, it is set to 0.
Constants
Print options theme.