NTPPrinterSetPrinterOption

 

NTPPrinterSetPrinterOption ( <ReportHandle>, <PageOption>, <PrinterOption>, <OptionValue>, <OptionValueStr> ) -> <ErrorCode>

 

 

Description

 

This command allows the setting of printer options. Paper tray, paper size and paper orientation may be set, just to name a few. There are two different printer allocations (Parameter <PageOption>): For the first page (NTPPRINTER_FIRST_PAGE_PRINTER ) and for the following pages (NTPPRINTER_FOLLOWING_PAGE_PRINTER) of a report. The parameter <PrinterOption> allows the selection of the desired printer option and the option can then be changed by using <OptionValue> or <OptionValueStr>.

 

Important note: When changing a printer option, always set it for both printers (that for the first page and the one for the following pages). If an option is not set for one printer, it is automatically taken from the other.

 

 

Declaration for Lotus Script

 

Declare Function NTPPrinterSetPrinterOption Lib "NTP.DLL" ( ByVal ReportHandle As Long, ByVal PageOption As Long, ByVal PrinterOption As Long, ByVal OptionValue As Long, ByVal OptionValueStr As String ) As Long

 

 

Parameter

 

<ReportHandle> (LONG)

Report handle, returned by calling NTPInit or NTPInitFromDatabase.

 

<PageOption> (LONG)

This option allows the definition if the settings refer to the first page or the following pages:

 

NTPPRINTER_FIRST_PAGE_PRINTER

NTPPRINTER_FOLLOWING_PAGE_PRINTER

 

<PrinterOption> (LONG)

This option allows the choice of which setting is to be changed. The following options are possible:

 

NTPPRINTER_PAPER_BIN

Chose paper bin

NTPPRINTER_PAPER_FORMAT

Chose paper format

NTPPRINTER_PAPER_ORIENTATION

Chose paper orientation

 

<OptionValue> (LONG) and <OptionValueStr> (STRING)

The options selected under <PrinterOption> are set here by using the appropriate values. The following shows the possible settings for the <PrinterOption>:

 

NTPPRINTER_PAPER_BIN

 

This option is set using the <OptionValue> parameter. The <OptionValueStr> parameter is always set to "". Possible values for <OptionValue> are:

 

NTPPRINTER_PAPER_BIN_UPPER

NTPPRINTER_PAPER_BIN_FIRST

NTPPRINTER_PAPER_BIN_ONLYONE

NTPPRINTER_PAPER_BIN_LOWER

NTPPRINTER_PAPER_BIN_MIDDLE

NTPPRINTER_PAPER_BIN_MANUAL

NTPPRINTER_PAPER_BIN_ENVELOPE

NTPPRINTER_PAPER_BIN_ENVMANUAL

NTPPRINTER_PAPER_BIN_AUTO

NTPPRINTER_PAPER_BIN_TRACTOR

NTPPRINTER_PAPER_BIN_SMALLFMT

NTPPRINTER_PAPER_BIN_LARGEFMT

NTPPRINTER_PAPER_BIN_LARGECAPACITY

NTPPRINTER_PAPER_BIN_CASSETTE

NTPPRINTER_PAPER_BIN_FORMSOURCE

NTPPRINTER_PAPER_BIN_LAST

 

NTPPRINTER_PAPER_FORMAT

 

This is set using the <OptionValue> parameter. The parameter <OptionValueStr> is always set to "". Possible values for <OptionValue> are:

 

NTPPRINTER_PAPER_LETTER

NTPPRINTER_PAPER_FIRST

NTPPRINTER_PAPER_LETTERSMALL

NTPPRINTER_PAPER_TABLOID

NTPPRINTER_PAPER_LEDGER

NTPPRINTER_PAPER_LEGAL

NTPPRINTER_PAPER_STATEMENT

NTPPRINTER_PAPER_EXECUTIVE

NTPPRINTER_PAPER_A3

NTPPRINTER_PAPER_A4

NTPPRINTER_PAPER_A4SMALL

NTPPRINTER_PAPER_A5

NTPPRINTER_PAPER_B4

NTPPRINTER_PAPER_B5

NTPPRINTER_PAPER_FOLIO

NTPPRINTER_PAPER_QUARTO

NTPPRINTER_PAPER_10X14

NTPPRINTER_PAPER_11X17

NTPPRINTER_PAPER_NOTE

NTPPRINTER_PAPER_ENV_9

NTPPRINTER_PAPER_ENV_10

NTPPRINTER_PAPER_ENV_11

NTPPRINTER_PAPER_ENV_12

NTPPRINTER_PAPER_ENV_14

NTPPRINTER_PAPER_CSHEET

NTPPRINTER_PAPER_DSHEET

NTPPRINTER_PAPER_ESHEET

NTPPRINTER_PAPER_ENV_DL

NTPPRINTER_PAPER_ENV_C5

NTPPRINTER_PAPER_ENV_C3

NTPPRINTER_PAPER_ENV_C4

NTPPRINTER_PAPER_ENV_C6

NTPPRINTER_PAPER_ENV_C65

NTPPRINTER_PAPER_ENV_B4

NTPPRINTER_PAPER_ENV_B5

NTPPRINTER_PAPER_ENV_B6

NTPPRINTER_PAPER_ENV_ITALY

NTPPRINTER_PAPER_ENV_MONARCH

NTPPRINTER_PAPER_ENV_PERSONAL

NTPPRINTER_PAPER_FANFOLD_US

NTPPRINTER_PAPER_FANFOLD_STD_GERMAN

NTPPRINTER_PAPER_FANFOLD_LGL_GERMAN

NTPPRINTER_PAPER_ISO_B4

NTPPRINTER_PAPER_JAPANESE_POSTCARD

NTPPRINTER_PAPER_9X11

NTPPRINTER_PAPER_10X11

NTPPRINTER_PAPER_15X11

NTPPRINTER_PAPER_ENV_INVITE

NTPPRINTER_PAPER_RESERVED_48

NTPPRINTER_PAPER_RESERVED_49

NTPPRINTER_PAPER_LETTER_EXTRA

NTPPRINTER_PAPER_LEGAL_EXTRA

NTPPRINTER_PAPER_TABLOID_EXTRA

NTPPRINTER_PAPER_A4_EXTRA

NTPPRINTER_PAPER_LETTER_TRANSVERSE

NTPPRINTER_PAPER_A4_TRANSVERSE

NTPPRINTER_PAPER_LETTER_EXTRA_TRANSVERSE

NTPPRINTER_PAPER_A_PLUS

NTPPRINTER_PAPER_B_PLUS

NTPPRINTER_PAPER_LETTER_PLUS

NTPPRINTER_PAPER_A4_PLUS

NTPPRINTER_PAPER_A5_TRANSVERSE

NTPPRINTER_PAPER_B5_TRANSVERSE

NTPPRINTER_PAPER_A3_EXTRA

NTPPRINTER_PAPER_A5_EXTRA

NTPPRINTER_PAPER_B5_EXTRA

NTPPRINTER_PAPER_A2

NTPPRINTER_PAPER_A3_TRANSVERSE

NTPPRINTER_PAPER_A3_EXTRA_TRANSVERSE

 

NTPPRINTER_PAPER_ORIENTATION

 

This is set using the <OptionValue> parameter. The parameter <OptionValueStr> is always set to "". Possible values for <OptionValue> are:

 

NTPPRINTER_PAPER_ORIENTATION_PORTRAIT

NTPPRINTER_PAPER_ORIENTATION_LANDSCAPE

 

Note: The paper orientation can only be changed via this command. Changing it in the printer dialogue is not possible.

 

 

Return value

 

<ErrorCode> (LONG)

Number of the error encountered (0 = no error)