---
title: "Create PDF annotations in your MAUI PDF viewer | Nutrient"
canonical_url: "https://www.nutrient.io/guides/maui/annotations/create-edit-and-remove/create/"
md_url: "https://www.nutrient.io/guides/maui/annotations/create-edit-and-remove/create.md"
last_updated: "2026-05-23T00:08:18.135Z"
description: "Since Nutrient MAUI SDK implements an optimistic user interface (UI), you can easily create annotations directly through the UI."
---

# Create PDF annotations in our MAUI viewer

Since Nutrient MAUI SDK implements an optimistic user interface (UI), you can easily create [annotations directly through the UI](https://www.nutrient.io/guides/maui/annotations/built-in-ui.md).

An annotation can be created using the [`IAnnotationFactory.CreateAnnotation<TAnnotationType>()`](https://www.nutrient.io/api/maui/api/PSPDFKit.Api.Annotation.IAnnotationFactory.html) method. The annotation can then be added to a document using [`IAnnotationManager.AddAnnotation()`](https://www.nutrient.io/api/maui/api/PSPDFKit.Api.Annotation.IAnnotationManager.html#PSPDFKit_Api_Annotation_IAnnotationManager_AddAnnotation_PSPDFKit_Api_Annotation_IAnnotation_). This will return a task that resolves to the created annotation’s ID:

```csharp

var annotation = _annotationManager.AnnotationFactory.CreateAnnotation<Line>();
await _annotationManager.AddAnnotation(annotation);

```

Following the optimistic UI approach, the changes will be instantly visible in the UI, but they aren’t persisted until the annotations are saved. This is done by saving them [using JavaScript APIs](https://www.nutrient.io/guides/maui/advanced-access-apis.md). You can [save them to external storage](https://www.nutrient.io/guides/web/annotations/save/to-external-storage.md) or [embed them into a document](https://www.nutrient.io/guides/web/annotations/save/embed-into-pdf.md). They can also be exported to [Instant JSON](https://www.nutrient.io/guides/maui/annotations/instant-json.md) using native APIs or [XFDF](https://www.nutrient.io/guides/web/importing-exporting/xfdf-support.md) by bridging JavaScript APIs.
---

## Related pages

- [Adding annotations to images](/guides/maui/annotations/create-edit-and-remove/add-annotation-to-image.md)
- [Remove PDF annotations in MAUI](/guides/maui/annotations/create-edit-and-remove/remove.md)
- [Edit PDF annotations in MAUI](/guides/maui/annotations/create-edit-and-remove/edit.md)

