Stay organized with collections
Save and categorize content based on your preferences.
PdfDocument.Page
public
static
final
class
PdfDocument.Page
extends Object
This class represents a PDF document page. It has associated
a canvas on which you can draw content and is acquired by a
call to getCanvas()
. It also has associated a
PageInfo
instance that describes its attributes. Also
a page has
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public methods
getCanvas
public Canvas getCanvas ()
Gets the Canvas
of the page.
Note: There are some draw operations that are not yet
supported by the canvas returned by this method. More specifically:
Returns |
Canvas |
The canvas if the page is not finished, null otherwise. |
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.Page\n\nAdded in [API level 19](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nPdfDocument.Page\n================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/graphics/pdf/PdfDocument.Page \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\nfinal\n\nclass\nPdfDocument.Page\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|---------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.graphics.pdf.PdfDocument.Page |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThis class represents a PDF document page. It has associated\na canvas on which you can draw content and is acquired by a\ncall to [getCanvas()](/reference/android/graphics/pdf/PdfDocument.Page#getCanvas()). It also has associated a\n[PageInfo](/reference/android/graphics/pdf/PdfDocument.PageInfo) instance that describes its attributes. Also\na page has\n\nSummary\n-------\n\n| ### Public methods ||\n|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` `[Canvas](/reference/android/graphics/Canvas) | ` `[getCanvas](/reference/android/graphics/pdf/PdfDocument.Page#getCanvas())`() ` Gets the [Canvas](/reference/android/graphics/Canvas) of the page. |\n| ` `[PdfDocument.PageInfo](/reference/android/graphics/pdf/PdfDocument.PageInfo) | ` `[getInfo](/reference/android/graphics/pdf/PdfDocument.Page#getInfo())`() ` Gets the [PageInfo](/reference/android/graphics/pdf/PdfDocument.PageInfo) with meta-data for the page. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nPublic methods\n--------------\n\n### getCanvas\n\nAdded in [API level 19](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic Canvas getCanvas ()\n```\n\nGets the [Canvas](/reference/android/graphics/Canvas) of the page.\n\n\n**Note:** There are some draw operations that are not yet\nsupported by the canvas returned by this method. More specifically:\n\n- Inverse path clipping performed via [android.graphics.Region.Op)](/reference/android/graphics/Canvas#clipPath(android.graphics.Path,%20android.graphics.Region.Op)) for [Region.Op#REVERSE_DIFFERENCE](/reference/android/graphics/Region.Op#REVERSE_DIFFERENCE) operations.\n- [int, int[], int, short[], int, int, android.graphics.Paint)](/reference/android/graphics/Canvas#drawVertices(android.graphics.Canvas.VertexMode,%20int,%20float[],%20int,%20float[],%20int,%20int[],%20int,%20short[],%20int,%20int,%20android.graphics.Paint))\n- Color filters set via [Paint.setColorFilter(\n android.graphics.ColorFilter)](/reference/android/graphics/Paint#setColorFilter(android.graphics.ColorFilter))\n- Mask filters set via [Paint.setMaskFilter(\n android.graphics.MaskFilter)](/reference/android/graphics/Paint#setMaskFilter(android.graphics.MaskFilter))\n- Some XFER modes such as [PorterDuff.Mode SRC](/reference/android/graphics/PorterDuff.Mode#SRC_ATOP), [PorterDuff.DST_ATOP](/reference/android/graphics/PorterDuff.Mode#DST_ATOP), [PorterDuff.XOR](/reference/android/graphics/PorterDuff.Mode#XOR), [PorterDuff.ADD](/reference/android/graphics/PorterDuff.Mode#ADD)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|----------------------------------------------|----------------------------------------------------------------|\n| [Canvas](/reference/android/graphics/Canvas) | The canvas if the page is not finished, null otherwise. \u003cbr /\u003e |\n\n**See also:**\n\n- [PdfDocument.finishPage(Page)](/reference/android/graphics/pdf/PdfDocument#finishPage(android.graphics.pdf.PdfDocument.Page)) \n\n### getInfo\n\nAdded in [API level 19](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic PdfDocument.PageInfo getInfo ()\n```\n\nGets the [PageInfo](/reference/android/graphics/pdf/PdfDocument.PageInfo) with meta-data for the page.\n\n\u003cbr /\u003e\n\n| Returns ||\n|------------------------------------------------------------------------------|-----------------------|\n| [PdfDocument.PageInfo](/reference/android/graphics/pdf/PdfDocument.PageInfo) | The page info. \u003cbr /\u003e |\n\n**See also:**\n\n- [PdfDocument.finishPage(Page)](/reference/android/graphics/pdf/PdfDocument#finishPage(android.graphics.pdf.PdfDocument.Page))"]]