# 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)

*** ** * ** ***


```
public interface PdfDocument.OnPdfContentInvalidatedListener
```

<br />

*** ** * ** ***

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

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/pdf/PdfDocument.OnPdfContentInvalidatedListener#onPdfContentInvalidated(kotlin.Int,kotlin.collections.List)( int pageNumber, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html> dirtyAreas )` Invoked when some regions of the PDF content are invalidated, and need to be re-rendered. |

## Public methods

### onPdfContentInvalidated

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

```
abstract void onPdfContentInvalidated(
    int pageNumber,
    @NonNull List<@NonNull Rect> dirtyAreas
)
```

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 |
|---|---|
| `int pageNumber` | The page number (0-index based) on which the content was invalidated. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Rect.html> dirtyAreas` | 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. |