Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for creating a PrintJobInfo
.
Summary
Public constructors |
Constructor.
|
Public methods |
PrintJobInfo |
Creates a new PrintJobInfo instance.
|
Unit |
Puts an advanced (printer specific) option.
|
Unit |
Puts an advanced (printer specific) option.
|
Unit |
Sets the print job attributes.
|
Unit |
Sets the number of copies.
|
Unit |
Sets the included pages.
|
Public constructors
Builder
Builder(prototype: PrintJobInfo?)
Constructor.
Parameters |
prototype |
PrintJobInfo?: Prototype to use as a starting point. Can be null . |
Public methods
putAdvancedOption
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. |
putAdvancedOption
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 . |
setAttributes
fun setAttributes(attributes: PrintAttributes): Unit
Sets the print job attributes.
Parameters |
attributes |
PrintAttributes: The attributes. This value cannot be null . |
setCopies
fun setCopies(copies: Int): Unit
Sets the number of copies.
Parameters |
copies |
Int: The number of copies. Value is 1 or greater |
setPages
fun setPages(pages: Array<PageRange!>): Unit
Sets the included pages.
Parameters |
pages |
Array<PageRange!>: The included pages. This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# PrintJobInfo.Builder\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/print/PrintJobInfo.Builder \"View this page in Java\") \n\n```\nclass Builder\n```\n\n|---|-----------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.print.PrintJobInfo.Builder](#) |\n\nBuilder for creating a [PrintJobInfo](/reference/kotlin/android/print/PrintJobInfo).\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(android.print.PrintJobInfo))`(`prototype:` `[PrintJobInfo](/reference/kotlin/android/print/PrintJobInfo)?`)` Constructor. |\n\n| Public methods ||\n|------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [PrintJobInfo](/reference/kotlin/android/print/PrintJobInfo) | [build](#build())`()` Creates a new [PrintJobInfo](/reference/kotlin/android/print/PrintJobInfo) instance. |\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [putAdvancedOption](#putAdvancedOption(kotlin.String,%20kotlin.Int))`(`key:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `value:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Puts an advanced (printer specific) option. |\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [putAdvancedOption](#putAdvancedOption(kotlin.String,%20kotlin.String))`(`key:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `value:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?`)` Puts an advanced (printer specific) option. |\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [setAttributes](#setAttributes(android.print.PrintAttributes))`(`attributes:` `[PrintAttributes](/reference/kotlin/android/print/PrintAttributes)`)` Sets the print job attributes. |\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [setCopies](#setCopies(kotlin.Int))`(`copies:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the number of copies. |\n| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [setPages](#setPages(kotlin.Array))`(`pages:` `[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\u003c[PageRange](/reference/kotlin/android/print/PageRange)!\u003e`)` Sets the included pages. |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder(prototype: PrintJobInfo?)\n```\n\nConstructor.\n\n| Parameters ||\n|-------------|---------------------------------------------------------------------------------------------------------------------|\n| `prototype` | [PrintJobInfo](/reference/kotlin/android/print/PrintJobInfo)?: Prototype to use as a starting point. Can be `null`. |\n\nPublic methods\n--------------\n\n### build\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): PrintJobInfo\n```\n\nCreates a new [PrintJobInfo](/reference/kotlin/android/print/PrintJobInfo) instance.\n\n| Return ||\n|--------------------------------------------------------------|------------------------------------------------|\n| [PrintJobInfo](/reference/kotlin/android/print/PrintJobInfo) | The new instance. This value cannot be `null`. |\n\n### putAdvancedOption\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun putAdvancedOption(\n key: String, \n value: Int\n): Unit\n```\n\nPuts an advanced (printer specific) option.\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------------------------------------------|\n| `key` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The option key. This value cannot be `null`. |\n| `value` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The option value. |\n\n### putAdvancedOption\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun putAdvancedOption(\n key: String, \n value: String?\n): Unit\n```\n\nPuts an advanced (printer specific) option.\n\n| Parameters ||\n|---------|--------------------------------------------------------------------------------------------------------------------------------|\n| `key` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The option key. This value cannot be `null`. |\n| `value` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)?: The option value. This value may be `null`. |\n\n### setAttributes\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setAttributes(attributes: PrintAttributes): Unit\n```\n\nSets the print job attributes.\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------|\n| `attributes` | [PrintAttributes](/reference/kotlin/android/print/PrintAttributes): The attributes. This value cannot be `null`. |\n\n### setCopies\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setCopies(copies: Int): Unit\n```\n\nSets the number of copies.\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------------------------|\n| `copies` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The number of copies. Value is 1 or greater |\n\n### setPages\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setPages(pages: Array\u003cPageRange!\u003e): Unit\n```\n\nSets the included pages.\n\n| Parameters ||\n|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pages` | [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\\\u003c[PageRange](/reference/kotlin/android/print/PageRange)!\\\u003e: The included pages. This value cannot be `null`. |"]]