Skip to main content
Version: Next

PRINT OPTION VALUES

PRINT OPTION VALUES ( option ; namesArray {; info1Array {; info2Array}} )

ParameterTypeDescription
optionIntegerOption number
namesArrayText arrayNames of values
info1ArrayArray integerValues (1) of the option
info2ArrayArray integerValues (2) of the option

This command is not thread-safe, it cannot be used in preemptive code.

Description

The PRINT OPTION VALUES command returns in namesArray a list of names available for the print option defined. Optionally, you can retrieve additional information for each name in info1Array and info2Array.

Note: The PRINT OPTION VALUES command only operates with PostScript printers.

The option parameter allows you to specify the values to get. You must pass one of the following constants of the “Print Options” theme:

  • Paper option
  • Paper source option

option = Paper option (1)

If you pass Paper option in the option parameter, the command will return the following information:

  • in namesArray, the names of the available paper formats;
  • in info1Array, the heights of each paper format;
  • in info2Array, the widths of each paper format.

Note: In order to obtain this information, the print driver must have access to a valid PPD (PostScript Printer Description) file for the printer.

To apply a specific paper format using the SET PRINT OPTION command, you can either pass one of the values of namesArray, or the corresponding values of info1Array and info2Array.

option = Paper source option (5)

Note: This option can only be used under Windows.

If you pass Paper source option in the option parameter, the command returns the names of the different trays available in namesArray, and their internal Windows ID numbers in info1Array (info2Array remains empty). The order of the values in the arrays is defined by the print driver. To indicate a tray using the SET PRINT OPTION command, you must pass the index, as found in the namesArray or info1Array arrays, of the element desired.

For more information on the different print options, refer to the description of the SET PRINT OPTION and GET PRINT OPTION commands.

All the information returned by these commands is supplied by the operating system. Refer to the documentation of your system for more details about specific options.

See also

GET PRINT OPTION
SET PRINT OPTION