Added in API level 19

Builder

class Builder
kotlin.Any
   ↳ android.print.PrintJobInfo.Builder

Builder for creating a PrintJobInfo.

Summary

Public constructors
Builder(prototype: PrintJobInfo?)

Constructor.

Public methods
PrintJobInfo

Creates a new PrintJobInfo instance.

Unit

Puts an advanced (printer specific) option.

Unit
putAdvancedOption(key: String, value: Int)

Puts an advanced (printer specific) option.

Unit

Sets the print job attributes.

Unit
setCopies(copies: Int)

Sets the number of copies.

Unit

Sets the included pages.

Public constructors

Builder

Added in API level 19
Builder(prototype: PrintJobInfo?)

Constructor.

Parameters
prototype PrintJobInfo?: Prototype to use as a starting point. Can be null.

Public methods

build

Added in API level 19
fun build(): PrintJobInfo

Creates a new PrintJobInfo instance.

Return
PrintJobInfo The new instance. This value cannot be null.

putAdvancedOption

Added in API level 19
fun putAdvancedOption(
    key: String,
    value: String?
): Unit

Puts an advanced (printer specific) option.

Parameters
key String: The option key. This value cannot be null.
value String?: The option value. This value may be null.

putAdvancedOption

Added in API level 19
fun putAdvancedOption(
    key: String,
    value: Int
): Unit

Puts an advanced (printer specific) option.

Parameters
key String: The option key. This value cannot be null.
value Int: The option value.

setAttributes

Added in API level 19
fun setAttributes(attributes: PrintAttributes): Unit

Sets the print job attributes.

Parameters
attributes PrintAttributes: The attributes. This value cannot be null.

setCopies

Added in API level 19
fun setCopies(copies: Int): Unit

Sets the number of copies.

Parameters
copies Int: The number of copies. Value is 1 or greater

setPages

Added in API level 19
fun setPages(pages: Array<PageRange!>): Unit

Sets the included pages.

Parameters
pages Array<PageRange!>: The included pages. This value cannot be null.