Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder
Builder for creating a PageInfo
.
Summary
Public constructors |
Creates a new builder with the mandatory page info attributes.
|
Public constructors
Builder
Builder(
pageWidth: Int,
pageHeight: Int,
pageNumber: Int)
Creates a new builder with the mandatory page info attributes.
Parameters |
pageWidth |
Int: The page width in PostScript (1/72th of an inch). |
pageHeight |
Int: The page height in PostScript (1/72th of an inch). |
pageNumber |
Int: The page number. |
Public methods
setContentRect
fun setContentRect(contentRect: Rect!): PdfDocument.PageInfo.Builder!
Sets the content rectangle in PostScript point (1/72th of an inch). This is the area that contains the page content and is relative to the page top left.
Parameters |
contentRect |
Rect!: The content rectangle. Must fit in the page. |
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,["# PdfDocument.PageInfo.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/graphics/pdf/PdfDocument.PageInfo.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.graphics.pdf.PdfDocument.PageInfo.Builder](#) |\n\nBuilder for creating a [PageInfo](/reference/kotlin/android/graphics/pdf/PdfDocument.PageInfo).\n\nSummary\n-------\n\n| Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`pageWidth:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `pageHeight:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `pageNumber:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Creates a new builder with the mandatory page info attributes. |\n\n| Public methods ||\n|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [PdfDocument.PageInfo](/reference/kotlin/android/graphics/pdf/PdfDocument.PageInfo)! | [create](#create())`()` Creates a new [PageInfo](/reference/kotlin/android/graphics/pdf/PdfDocument.PageInfo). |\n| [PdfDocument.PageInfo.Builder](#)! | [setContentRect](#setContentRect(android.graphics.Rect))`(`contentRect:` `[Rect](../Rect.html#)!`)` Sets the content rectangle in PostScript point (1/72th of an inch). |\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(\n pageWidth: Int, \n pageHeight: Int, \n pageNumber: Int)\n```\n\nCreates a new builder with the mandatory page info attributes.\n\n| Parameters ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------|\n| `pageWidth` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The page width in PostScript (1/72th of an inch). |\n| `pageHeight` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The page height in PostScript (1/72th of an inch). |\n| `pageNumber` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The page number. |\n\nPublic methods\n--------------\n\n### create\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun create(): PdfDocument.PageInfo!\n```\n\nCreates a new [PageInfo](/reference/kotlin/android/graphics/pdf/PdfDocument.PageInfo).\n\n| Return ||\n|--------------------------------------------------------------------------------------|-------------------|\n| [PdfDocument.PageInfo](/reference/kotlin/android/graphics/pdf/PdfDocument.PageInfo)! | The new instance. |\n\n### setContentRect\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun setContentRect(contentRect: Rect!): PdfDocument.PageInfo.Builder!\n```\n\nSets the content rectangle in PostScript point (1/72th of an inch). This is the area that contains the page content and is relative to the page top left.\n\n| Parameters ||\n|---------------|----------------------------------------------------------------------|\n| `contentRect` | [Rect](../Rect.html#)!: The content rectangle. Must fit in the page. |"]]