How can I help you?
Annotations in .NET MAUI PDF Viewer (SfPdfViewer)
7 Mar 20266 minutes to read
The SfPdfViewer allows you to add, remove, and modify annotations in PDF documents. Annotations are useful for marking up document content — for example, highlighting important text, drawing shapes to indicate areas of interest, adding sticky notes for reviewer comments, or stamping a document with a status indicator.
This section covers the annotation types and common functionalities available in the PDF Viewer. For detailed instructions on each annotation type, refer to the individual sections listed below.
To learn how to work with annotations, you can also check out our video tutorial below.
Supported Annotation Types
The SfPdfViewer supports the following annotation types, grouped by category.
Text Markup Annotations
Use these annotations to mark up text content within the PDF document.
| Annotation | Description |
|---|---|
| Highlight | Highlights selected text with a color. |
| Underline | Draws a line beneath selected text. |
| Strikeout | Draws a line through selected text to indicate deletion. |
| Squiggly | Draws a wavy underline to indicate a possible error or area of concern. |
For more information, see Text Markup Annotations.
Shape Annotations
Use these annotations to draw geometric shapes over PDF content.
| Annotation | Description |
|---|---|
| Arrow | Draws an arrow to point to specific content. |
| Circle | Draws an ellipse or circle over the page. |
| Line | Draws a straight line between two points. |
| Polygon | Draws a closed polygon shape. |
| Polyline | Draws an open multi-segment line. |
| Square | Draws a rectangle over the page. |
For more information, see Shape Annotations.
Freehand and Rich Content Annotations
| Annotation | Description |
|---|---|
| Ink | Draws freehand strokes over the page. |
| Ink eraser | Erases parts of existing ink annotations. |
| Free text | Adds a text box directly on the page. |
| Stamp | Places an image or predefined stamp on the page. |
| Sticky notes | Attaches a pop-up note to a specific location on the page. |
For more information, see Ink Annotations, Free Text Annotations, Stamps, and Sticky Notes.
In This Section
Annotation Types
| Topic | Description |
|---|---|
| Text Markup Annotations | Highlight, underline, strikeout, and squiggly annotations on selected text. |
| Shape Annotations | Draw arrows, circles, lines, polygons, polylines, and rectangles over pages. |
| Ink Annotations | Draw freehand strokes over any page area. |
| Ink Eraser | Erase portions of existing ink annotations. |
| Free Text Annotations | Place a text box directly on the page. |
| Stamps | Apply predefined or custom image stamps on a page. |
| Sticky Notes | Attach pop-up notes to specific locations on a page. |
Common Annotation Operations
| Topic | Description |
|---|---|
| Add, Remove, and Modify Annotations | Programmatically add, update, and delete any annotation type. |
| Annotation Collection | Access and iterate the full annotation collection. |
| Select and Deselect Annotations | Select one or more annotations programmatically. |
| Lock and Unlock Annotations | Prevent annotations from being edited or deleted. |
| Show and Hide Annotations | Toggle visibility of annotations without removing them. |
| Import and Export Annotations | Import/export annotation data in XFDF, FDF, JSON, and XML formats. |
| Undo and Redo | Reverse or reapply recent annotation changes. |
| Annotation Comments | Add review comments and status to annotations. |