# PdfDocument.OnPdfContentInvalidatedListener

Artifact: [androidx.pdf:pdf-core](https://developer.android.com/jetpack/androidx/releases/pdf) [View Source](https://cs.android.com/search?q=file:androidx/pdf/PdfDocument.kt+class:androidx.pdf.PdfDocument.OnPdfContentInvalidatedListener) Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

*** ** * ** ***


```
interface PdfDocument.OnPdfContentInvalidatedListener
```

<br />

*** ** * ** ***

Listener interface for receiving notifications when some regions of the PDF content are invalidated.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/pdf/PdfDocument.OnPdfContentInvalidatedListener#onPdfContentInvalidated(kotlin.Int,kotlin.collections.List)(pageNumber: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, dirtyAreas: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/android/graphics/Rect.html>)` Invoked when some regions of the PDF content are invalidated, and need to be re-rendered. |

## Public functions

### onPdfContentInvalidated

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
fun onPdfContentInvalidated(pageNumber: Int, dirtyAreas: List<Rect>): Unit
```

Invoked when some regions of the PDF content are invalidated, and need to be re-rendered. (example scenario - when a form field is edited in the PDF.)

| Parameters |
|---|---|
| `pageNumber: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The page number (0-index based) on which the content was invalidated. |
| `dirtyAreas: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/android/graphics/Rect.html>` | A list of `https://developer.android.com/reference/android/graphics/Rect.html` indicating regions of the PDF content that were invalidated and need to be re-rendered in order to sync UI to the latest state of the document. |