# PdfAnnotation

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

*** ** * ** ***


```
public abstract class PdfAnnotation
```

<br />

Known direct subclasses [HighlightAnnotation](https://developer.android.com/reference/androidx/pdf/annotation/content/HighlightAnnotation), [StampAnnotation](https://developer.android.com/reference/androidx/pdf/annotation/content/StampAnnotation)

|---|---|
| `https://developer.android.com/reference/androidx/pdf/annotation/content/HighlightAnnotation` | Represents a Highlight Annotation in a PDF document. |
| `https://developer.android.com/reference/androidx/pdf/annotation/content/StampAnnotation` | Represents a stamp annotation in a PDF document. |

*** ** * ** ***

Represents an annotation on a PDF page.

This abstract class serves as the base for different types of PDF annotations. It handles common properties and behaviors.

## Summary

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/pdf/annotation/content/PdfAnnotation#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `int` | `https://developer.android.com/reference/androidx/pdf/annotation/content/PdfAnnotation#getPageNum()()` The page number (0-indexed) where this annotation is located. |
| `int` | `https://developer.android.com/reference/androidx/pdf/annotation/content/PdfAnnotation#hashCode()()` |

## Public methods

### equals

```
public boolean equals(Object other)
```

### getPageNum

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

```
public int getPageNum()
```

The page number (0-indexed) where this annotation is located.

### hashCode

```
public int hashCode()
```