---
title: "PdfAnnotationCollection"
canonical_url: "https://www.nutrient.io/api/python/editors/pdf/annotations/pdf-annotation-collection/"
md_url: "https://www.nutrient.io/api/python/editors/pdf/annotations/pdf-annotation-collection.md"
last_updated: "2026-06-09T10:32:42.528Z"
description: "Represents a collection of annotations on a PDF page. Provides methods to access, add, and remove annotations."
---

Represents a collection of annotations on a PDF page. Provides methods to access, add, and remove annotations.

```python

from nutrient_sdk import PdfAnnotationCollection

```

## Construction

`PdfAnnotationCollection` cannot be instantiated directly. Obtain instances through static factory methods or via other SDK classes.

## Methods

### add_circle

```python

def add_circle(self, x: float, y: float, width: float, height: float, author: str, contents: str) -> PdfCircleAnnotation

```

Adds a circle (ellipse) annotation to this page.

**Parameters:**

| Name       | Type    | Description                                           |
| ---------- | ------- | ----------------------------------------------------- |
| `x`        | `float` | The x coordinate of the bounding rectangle in points. |
| `y`        | `float` | The y coordinate of the bounding rectangle in points. |
| `width`    | `float` | The width of the bounding rectangle in points.        |
| `height`   | `float` | The height of the bounding rectangle in points.       |
| `author`   | `str`   | The author of the annotation.                         |
| `contents` | `str`   | The text contents/comment for the annotation.         |

**Returns:** [`PdfCircleAnnotation`](/api/python/editors/pdf/annotations/pdf-circle-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_free_text

```python

def add_free_text(self, x: float, y: float, width: float, height: float, author: str, contents: str, font_name: str, font_size: float, font_color: Color) -> PdfFreeTextAnnotation

```

Adds a free text annotation (text box) to this page.

**Parameters:**

| Name         | Type                                | Description                                 |
| ------------ | ----------------------------------- | ------------------------------------------- |
| `x`          | `float`                             | The x coordinate of the text box in points. |
| `y`          | `float`                             | The y coordinate of the text box in points. |
| `width`      | `float`                             | The width of the text box in points.        |
| `height`     | `float`                             | The height of the text box in points.       |
| `author`     | `str`                               | The author of the annotation.               |
| `contents`   | `str`                               | The text contents to display.               |
| `font_name`  | `str`                               | The name of the font to use.                |
| `font_size`  | `float`                             | The size of the font in points.             |
| `font_color` | [`Color`](/api/python/types/color/) | The color of the text.                      |

**Returns:** [`PdfFreeTextAnnotation`](/api/python/editors/pdf/annotations/pdf-free-text-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_highlight

```python

def add_highlight(self, x: float, y: float, width: float, height: float, author: str, contents: str) -> PdfHighlightAnnotation

```

Adds a highlight annotation to this page.

**Parameters:**

| Name       | Type    | Description                                       |
| ---------- | ------- | ------------------------------------------------- |
| `x`        | `float` | The x coordinate of the highlight area in points. |
| `y`        | `float` | The y coordinate of the highlight area in points. |
| `width`    | `float` | The width of the highlight area in points.        |
| `height`   | `float` | The height of the highlight area in points.       |
| `author`   | `str`   | The author of the annotation.                     |
| `contents` | `str`   | The text contents/comment for the annotation.     |

**Returns:** [`PdfHighlightAnnotation`](/api/python/editors/pdf/annotations/pdf-highlight-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_line

```python

def add_line(self, start_x: float, start_y: float, end_x: float, end_y: float, author: str, contents: str) -> PdfLineAnnotation

```

Adds a line annotation to this page.

**Parameters:**

| Name       | Type    | Description                                     |
| ---------- | ------- | ----------------------------------------------- |
| `start_x`  | `float` | X coordinate of the line start point in points. |
| `start_y`  | `float` | Y coordinate of the line start point in points. |
| `end_x`    | `float` | X coordinate of the line end point in points.   |
| `end_y`    | `float` | Y coordinate of the line end point in points.   |
| `author`   | `str`   | The author of the annotation.                   |
| `contents` | `str`   | The text contents/comment for the annotation.   |

**Returns:** [`PdfLineAnnotation`](/api/python/editors/pdf/annotations/pdf-line-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_link

```python

def add_link(self, x: float, y: float, width: float, height: float) -> PdfLinkAnnotation

```

Adds an empty link annotation to this page. Use the returned annotation's property or method to configure the link target.

**Parameters:**

| Name     | Type    | Description                                  |
| -------- | ------- | -------------------------------------------- |
| `x`      | `float` | The x coordinate of the link area in points. |
| `y`      | `float` | The y coordinate of the link area in points. |
| `width`  | `float` | The width of the link area in points.        |
| `height` | `float` | The height of the link area in points.       |

**Returns:** [`PdfLinkAnnotation`](/api/python/editors/pdf/annotations/pdf-link-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_redact

```python

def add_redact(self, x: float, y: float, width: float, height: float) -> PdfRedactAnnotation

```

Adds a redaction annotation to this page. The annotation marks content for redaction but does not apply the redaction until is called.

**Parameters:**

| Name     | Type    | Description                                       |
| -------- | ------- | ------------------------------------------------- |
| `x`      | `float` | The x coordinate of the redaction area in points. |
| `y`      | `float` | The y coordinate of the redaction area in points. |
| `width`  | `float` | The width of the redaction area in points.        |
| `height` | `float` | The height of the redaction area in points.       |

**Returns:** [`PdfRedactAnnotation`](/api/python/editors/pdf/annotations/pdf-redact-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_square

```python

def add_square(self, x: float, y: float, width: float, height: float, author: str, contents: str) -> PdfSquareAnnotation

```

Adds a square (rectangle) annotation to this page.

**Parameters:**

| Name       | Type    | Description                                   |
| ---------- | ------- | --------------------------------------------- |
| `x`        | `float` | The x coordinate of the rectangle in points.  |
| `y`        | `float` | The y coordinate of the rectangle in points.  |
| `width`    | `float` | The width of the rectangle in points.         |
| `height`   | `float` | The height of the rectangle in points.        |
| `author`   | `str`   | The author of the annotation.                 |
| `contents` | `str`   | The text contents/comment for the annotation. |

**Returns:** [`PdfSquareAnnotation`](/api/python/editors/pdf/annotations/pdf-square-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_squiggly

```python

def add_squiggly(self, x: float, y: float, width: float, height: float, author: str, contents: str) -> PdfSquigglyAnnotation

```

Adds a squiggly underline annotation to this page.

**Parameters:**

| Name       | Type    | Description                                      |
| ---------- | ------- | ------------------------------------------------ |
| `x`        | `float` | The x coordinate of the squiggly area in points. |
| `y`        | `float` | The y coordinate of the squiggly area in points. |
| `width`    | `float` | The width of the squiggly area in points.        |
| `height`   | `float` | The height of the squiggly area in points.       |
| `author`   | `str`   | The author of the annotation.                    |
| `contents` | `str`   | The text contents/comment for the annotation.    |

**Returns:** [`PdfSquigglyAnnotation`](/api/python/editors/pdf/annotations/pdf-squiggly-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_stamp

```python

def add_stamp(self, x: float, y: float, width: float, height: float, title: str, contents: str) -> PdfStampAnnotation

```

Adds a rubber stamp annotation to this page.

**Parameters:**

| Name       | Type    | Description                              |
| ---------- | ------- | ---------------------------------------- |
| `x`        | `float` | The x coordinate of the stamp in points. |
| `y`        | `float` | The y coordinate of the stamp in points. |
| `width`    | `float` | The width of the stamp in points.        |
| `height`   | `float` | The height of the stamp in points.       |
| `title`    | `str`   | The title of the annotation.             |
| `contents` | `str`   | The text contents of the annotation.     |

**Returns:** [`PdfStampAnnotation`](/api/python/editors/pdf/annotations/pdf-stamp-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_sticky_note

```python

def add_sticky_note(self, x: float, y: float, author: str, subject: str, contents: str) -> PdfTextAnnotation

```

Adds a sticky note (text) annotation to this page.

**Parameters:**

| Name       | Type    | Description                                   |
| ---------- | ------- | --------------------------------------------- |
| `x`        | `float` | The x coordinate of the annotation in points. |
| `y`        | `float` | The y coordinate of the annotation in points. |
| `author`   | `str`   | The author of the annotation.                 |
| `subject`  | `str`   | The subject of the annotation.                |
| `contents` | `str`   | The text contents of the annotation.          |

**Returns:** [`PdfTextAnnotation`](/api/python/editors/pdf/annotations/pdf-text-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_strike_out

```python

def add_strike_out(self, x: float, y: float, width: float, height: float, author: str, contents: str) -> PdfStrikeOutAnnotation

```

Adds a strikeout annotation to this page.

**Parameters:**

| Name       | Type    | Description                                       |
| ---------- | ------- | ------------------------------------------------- |
| `x`        | `float` | The x coordinate of the strikeout area in points. |
| `y`        | `float` | The y coordinate of the strikeout area in points. |
| `width`    | `float` | The width of the strikeout area in points.        |
| `height`   | `float` | The height of the strikeout area in points.       |
| `author`   | `str`   | The author of the annotation.                     |
| `contents` | `str`   | The text contents/comment for the annotation.     |

**Returns:** [`PdfStrikeOutAnnotation`](/api/python/editors/pdf/annotations/pdf-strike-out-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### add_underline

```python

def add_underline(self, x: float, y: float, width: float, height: float, author: str, contents: str) -> PdfUnderlineAnnotation

```

Adds an underline annotation to this page.

**Parameters:**

| Name       | Type    | Description                                       |
| ---------- | ------- | ------------------------------------------------- |
| `x`        | `float` | The x coordinate of the underline area in points. |
| `y`        | `float` | The y coordinate of the underline area in points. |
| `width`    | `float` | The width of the underline area in points.        |
| `height`   | `float` | The height of the underline area in points.       |
| `author`   | `str`   | The author of the annotation.                     |
| `contents` | `str`   | The text contents/comment for the annotation.     |

**Returns:** [`PdfUnderlineAnnotation`](/api/python/editors/pdf/annotations/pdf-underline-annotation/) - The newly created.

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### remove_at

```python

def remove_at(self, index: int) -> None

```

Removes the annotation at the specified index.

**Parameters:**

| Name    | Type  | Description                                    |
| ------- | ----- | ---------------------------------------------- |
| `index` | `int` | The 0-based index of the annotation to remove. |

**Raises:**

- [`InvalidStateException`](/api/python/exceptions/invalid-state-exception/): Thrown when no page is loaded.

- [`IndexOutOfBoundsException`](/api/python/exceptions/index-out-of-bounds-exception/): Thrown when the index is out of range.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

## Properties

### count

```python

@property
def count(self) -> int

```

The number of annotations in the collection.

**Type:** `int`

*Read-only property.*

---

### enumerator

```python

@property
def enumerator(self) -> IEnumerator`1

```

Returns an enumerator that iterates through the annotation's collection.

**Type:** `IEnumerator`1`

*Read-only property.*

---

---

## Related pages

- [All public classes import directly from the top-level package:](/api/python/editors/pdf/annotations.md)
- [Pdf Annotation](/api/python/editors/pdf/annotations/pdf-annotation.md)
- [Pdf Circle Annotation](/api/python/editors/pdf/annotations/pdf-circle-annotation.md)
- [Pdf Highlight Annotation](/api/python/editors/pdf/annotations/pdf-highlight-annotation.md)
- [Pdf Line Annotation](/api/python/editors/pdf/annotations/pdf-line-annotation.md)
- [Pdf Markup Annotation](/api/python/editors/pdf/annotations/pdf-markup-annotation.md)
- [Pdf Link Annotation](/api/python/editors/pdf/annotations/pdf-link-annotation.md)
- [Pdf Shape Annotation](/api/python/editors/pdf/annotations/pdf-shape-annotation.md)
- [Pdf Redact Annotation](/api/python/editors/pdf/annotations/pdf-redact-annotation.md)
- [Pdf Free Text Annotation](/api/python/editors/pdf/annotations/pdf-free-text-annotation.md)
- [Pdf Square Annotation](/api/python/editors/pdf/annotations/pdf-square-annotation.md)
- [Pdf Squiggly Annotation](/api/python/editors/pdf/annotations/pdf-squiggly-annotation.md)
- [Pdf Stamp Annotation](/api/python/editors/pdf/annotations/pdf-stamp-annotation.md)
- [Pdf Strike Out Annotation](/api/python/editors/pdf/annotations/pdf-strike-out-annotation.md)
- [Pdf Underline Annotation](/api/python/editors/pdf/annotations/pdf-underline-annotation.md)
- [Pdf Text Annotation](/api/python/editors/pdf/annotations/pdf-text-annotation.md)
- [Pdf Widget Annotation](/api/python/editors/pdf/annotations/pdf-widget-annotation.md)

