4D Write v14

WR GET PRINT OPTION

Home

 
4D Write v14
WR GET PRINT OPTION

WR GET PRINT OPTION 


 

WR GET PRINT OPTION ( area ; option ; value1 ; value2 ; value3 ) 
Parameter Type   Description
area  Longint in 4D Write area
option  Longint in Option number
value1  Longint in Value 1 of the option
value2  Longint in Value 2 of the option
value3  String in Value 3 of the option

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:

Constant Type Value
wr color option Longint 8
wr destination option Longint 9
wr double sided option Longint 11
wr number of copies option Longint 4
wr orientation option Longint 2
wr pages from option Longint 6
wr pages to option Longint 7
wr paper option Longint 1
wr paper source option Longint 5
wr scale option Longint 3
wr spooler document name option Longint 12

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.

 
PROPERTIES 

Product: 4D Write
Theme: WR Printing
Number: 89420

 
HISTORY 

Created: 4D Write 2004

 
SEE ALSO 

WR SET PRINT OPTION

 
ARTICLE USAGE

4D Write Language ( 4D Write v11.6)
4D Write Language ( 4D Write v12)
4D Write Language ( 4D Write v14)
4D Write Language ( 4D v13)
4D Write Language ( 4D Write v14 R2)
4D Write Language ( 4D Write v14 R3)
4D Write Language ( 4D Write v14 R4)