BBjAPI::getBBjPrinter

Description

In BBj 4.0 and higher, this method obtains a BBjPrinter object that allows printing documents.

Syntax

Return Value

Method

BBjPrinter

getBBjPrinter(boolean client)

BBjPrinter

getBBjPrinter(Attributes attributes, boolean client)

BBjPrinter

getBBjPrinter(string name, boolean client)

Parameters

Variable

Description

client

This boolean value specifies whether to use a client/remote printer (true) or a server/local printer (false).

attributes

Specifies the set of javax.print.attribute.PrintService attributes that must be satisfied by the list of printer names returned.

name

Name of the printer to select. Same as specifying a javax.print.attribute.standard.PrinterName attributes.

Return Value

Returns a BBjPrinter object.

Remarks

When calling the method specifying server or client, the selected printer is the default printer for the appropriate machine.

Example

REM Get PrintRequest attribues for print job

REM Obtain the instance to the BBjAPI object
myAPI!=BBjAPI()

REM Obtain an instance of a default BBjPrinter object
LET myBBjPrinter!=myAPI!.getBBjPrinter(0)

RELEASE

See Also

BBjAPI

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.