# PdfDocument.Page

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Page

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/graphics/pdf/PdfDocument.Page "View this page in Java")  

```
class Page
```

|---|--------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                 ||
| ↳ | [android.graphics.pdf.PdfDocument.Page](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument.Page#) |

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()](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument.Page#getCanvas()). It also has associated a[PageInfo](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument.PageInfo)instance that describes its attributes. Also a page has

## Summary

|                                                                                                                                                                              Public methods                                                                                                                                                                               ||
|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Canvas](https://developer.android.com/reference/kotlin/android/graphics/Canvas.html#)!                           | [getCanvas](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument.Page#getCanvas())`()` Gets the[Canvas](https://developer.android.com/reference/kotlin/android/graphics/Canvas.html#)of the page.                           |
| [PdfDocument.PageInfo](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument.PageInfo)! | [getInfo](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument.Page#getInfo())`()` Gets the[PageInfo](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument.PageInfo)with meta-data for the page. |

## Public methods

### getCanvas

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getCanvas(): Canvas!
```

Gets the[Canvas](https://developer.android.com/reference/kotlin/android/graphics/Canvas.html#)of the page.

**Note:**There are some draw operations that are not yet supported by the canvas returned by this method. More specifically:

- Inverse path clipping performed via[android.graphics.Region.Op)](https://developer.android.com/reference/kotlin/android/graphics/Canvas.html#clipPath(android.graphics.Path,%20android.graphics.Region.Op))for[Region.Op#REVERSE_DIFFERENCE](https://developer.android.com/reference/kotlin/android/graphics/Region.Op.html#)operations.
- [int, int[], int, short[], int, int, android.graphics.Paint)](https://developer.android.com/reference/kotlin/android/graphics/Canvas.html#drawVertices(android.graphics.Canvas.VertexMode,%20kotlin.Int,%20kotlin.FloatArray,%20kotlin.Int,%20kotlin.FloatArray,%20kotlin.Int,%20kotlin.IntArray,%20kotlin.Int,%20kotlin.ShortArray,%20kotlin.Int,%20kotlin.Int,%20android.graphics.Paint))
- Color filters set via[Paint.setColorFilter(](https://developer.android.com/reference/kotlin/android/graphics/Paint.html#setColorFilter(android.graphics.ColorFilter))
- Mask filters set via[Paint.setMaskFilter(](https://developer.android.com/reference/kotlin/android/graphics/Paint.html#setMaskFilter(android.graphics.MaskFilter))
- Some XFER modes such as[PorterDuff.Mode SRC](https://developer.android.com/reference/kotlin/android/graphics/PorterDuff.Mode.html#),[PorterDuff.DST_ATOP](https://developer.android.com/reference/kotlin/android/graphics/PorterDuff.Mode.html#),[PorterDuff.XOR](https://developer.android.com/reference/kotlin/android/graphics/PorterDuff.Mode.html#),[PorterDuff.ADD](https://developer.android.com/reference/kotlin/android/graphics/PorterDuff.Mode.html#)

|                                                                      Return                                                                      ||
|-----------------------------------------------------------------------------------------|---------------------------------------------------------|
| [Canvas](https://developer.android.com/reference/kotlin/android/graphics/Canvas.html#)! | The canvas if the page is not finished, null otherwise. |

**See Also**

- [android.graphics.pdf.PdfDocument#finishPage(Page)](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument#finishPage(android.graphics.pdf.PdfDocument.Page))  

### getInfo

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getInfo(): PdfDocument.PageInfo!
```

Gets the[PageInfo](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument.PageInfo)with meta-data for the page.

|                                                              Return                                                               ||
|-------------------------------------------------------------------------------------------------------------------|----------------|
| [PdfDocument.PageInfo](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument.PageInfo)! | The page info. |

**See Also**

- [android.graphics.pdf.PdfDocument#finishPage(Page)](https://developer.android.com/reference/kotlin/android/graphics/pdf/PdfDocument#finishPage(android.graphics.pdf.PdfDocument.Page))