---
title: "PdfAnnotationEditor.ExtractAnnotations"
url: "https://reference.aspose.com/pdf/net/aspose.pdf.facades/pdfannotationeditor/extractannotations/"
product: "Aspose.PDF for .NET API Reference"
description: "PdfAnnotationEditor method. Gets the list of annotations of the specified types"
---

## ExtractAnnotations(int, int, string[]) {#extractannotations_1}

Gets the list of annotations of the specified types.

```csharp
public IList<Annotation> ExtractAnnotations(int start, int end, string[] annotTypes)
```

| Parameter | Type | Description |
| --- | --- | --- |
| start | Int32 | Start page from which the annotations will be selected. |
| end | Int32 | End page to which the annotations will be selected. |
| annotTypes | String[] | The array of needed annotation types. |

### Return Value

Annotations list.

## Examples

```csharp
PdfAnnotationEditor editor = new PdfAnnotationEditor();
editor.BindPdf("example.pdf");
string[] annotTypes = new string[] {"Text", "Highlight"};
IList annotList = editor.ExtractAnnotations(1, 2 , annotTypes);
```

### See Also

* class [Annotation](../../../aspose.pdf.annotations/annotation/)
* class [PdfAnnotationEditor](../)
* namespace [Aspose.Pdf.Facades](../../../aspose.pdf.facades/)
* assembly [Aspose.PDF](../../../)

---

## ExtractAnnotations(int, int, AnnotationType[]) {#extractannotations}

Gets the list of annotations of the specified types.

```csharp
public IList<Annotation> ExtractAnnotations(int start, int end, AnnotationType[] annotTypes)
```

| Parameter | Type | Description |
| --- | --- | --- |
| start | Int32 | Start page from which the annotations will be selected. |
| end | Int32 | End page to which the annotations will be selected. |
| annotTypes | AnnotationType[] | The array of needed annotation types. |

### Return Value

Annotations list.

## Examples

```csharp
PdfAnnotationEditor editor = new PdfAnnotationEditor();
editor.BindPdf("example.pdf");
AnnotationType[] annotTypes = new AnnotationType[] {AnnotationType.Text, AnnotationType.Highlight};
IList annotList = editor.ExtractAnnotations(1, 2 , annotTypes);
```

### See Also

* class [Annotation](../../../aspose.pdf.annotations/annotation/)
* enum [AnnotationType](../../../aspose.pdf.annotations/annotationtype/)
* class [PdfAnnotationEditor](../)
* namespace [Aspose.Pdf.Facades](../../../aspose.pdf.facades/)
* assembly [Aspose.PDF](../../../)


