GET PRINT OPTION

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 2004.3 (Modified)


GET PRINT OPTION (option; value1{; value2})

ParameterTypeDescription
optionLongintOption number
value1Longint | StringValue 1 of the option
value2LongintValue 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:

ConstantTypeValue
Paper optionLongint1
Orientation optionLongint2
Scale optionLongint3
Number of copies optionLongint4
Paper source optionLongint5
Color optionLongint8
Destination optionLongint9
Double sided optionLongint11
Spooler document name optionLongint12
Mac spool file format optionLongint13
Hide printing progress optionLongint14

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 width and height 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.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next