4D v16.3

PRINT OPTION VALUES

Home

 
4D v16.3
PRINT OPTION VALUES

PRINT OPTION VALUES 


 

PRINT OPTION VALUES ( option ; namesArray {; info1Array {; info2Array}} )  
Parameter Type   Description
option  Longint in Option number
namesArray  Text array in Names of values
info1Array  Longint array in Values (1) of the option
info2Array  Longint array in Values (2) of the option

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

The option parameter allows you to specify the option to get. You must pass one of the following constants of the “Print Options” theme (options able to return lists of value names):

Constant Type Value Comment
Paper option Longint 1 If you use only value1, it contains the name of the paper. If you use both parameters, value1 contains the paper width and value2 contains the paper height. The width and height are expressed in screen pixels. Use the PRINT OPTION VALUES command to get the name, height and width of all the paper formats offered by the printer.
Paper source option Longint 5 (Windows only) value1 only: number corresponding to the index, in the array of trays returned by the PRINT OPTION VALUES command, of the paper tray to be used. This option can only be used under Windows.

After command execution, the namesArray array as well as, where applicable, the info1Array and info2Array arrays will be filled in by the command with the names and information of the available values.

If you pass value 1 (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.

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

If you pass value 5 (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.

Note: This option can only be used under Windows.

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.

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



See also 

GET PRINT OPTION
SET PRINT OPTION

 
PROPERTIES 

Product: 4D
Theme: Printing
Number: 785

 
HISTORY 

Created: 4D 2003

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)