BBjPrinter::setAttributes

Description

In BBj 4.00 and higher, this method sets the javax.print.attribute.PrintRequest attributes for documents.

Syntax

Return Value

Method

void

setAttributes(PrintRequestAttributeSet attributes)

Parameters

Variable

Description

attributes

Specifies the set of javax.print.attribute.PrintRequest attributes that define the settings for documents.

Return Value

None.

Remarks

The attributes defined become the default for documents. The print dialog can override the defaults.

Example

rem 'Set PrintRequest attributes 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)

rem 'Create a set of request attributes
let requestAttributes! = new javax.print.attribute.HashPrintRequestAttributeSet()
requestAttributes!.add(javax.print.attribute.standard.MediaSizeName.NA_LETTER)
requestAttributes!.add(javax.print.attribute.standard.OrientationRequested.LANDSCAPE)

rem 'Set these request attributes
myBBjPrinter!.setAttributes(requestAttributes!)
release

See Also

BBjAPI

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