Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f910a47
UG Document correction using Code-Studio AI
KSilambharasanSF4548 Jul 8, 2026
60a97b7
fixed compilation error
KSilambharasanSF4548 Jul 9, 2026
cc21c22
Fix link to .NET MAUI PDF Viewer Example
KSilambharasanSF4548 Jul 9, 2026
b148524
reverted the changes
KSilambharasanSF4548 Jul 9, 2026
19aca48
Removed duplicate file
KSilambharasanSF4548 Jul 9, 2026
d7706bf
Removed unwanted changes
KSilambharasanSF4548 Jul 10, 2026
33ade92
Revise annotation handling documentation in PDF Viewer
KSilambharasanSF4548 Jul 10, 2026
02c73ee
Addressed feedbacks
KSilambharasanSF4548 Jul 10, 2026
900f912
Refactor Annotations-Comment.md for clarity
KSilambharasanSF4548 Jul 10, 2026
3d74fcc
Update Coordinates-Conversion.md to remove code snippet
KSilambharasanSF4548 Jul 10, 2026
6fc64b0
Revise PDF document unloading notes and path format
KSilambharasanSF4548 Jul 10, 2026
3548b5f
Fix path separator for embedded resource in example
KSilambharasanSF4548 Jul 10, 2026
e4401ac
Update Scrolling.md to include links for OverscanCount
KSilambharasanSF4548 Jul 10, 2026
a34ec99
Fix formatting and improve undo/redo command examples
KSilambharasanSF4548 Jul 10, 2026
3a3d4e1
Clean up annotations comment documentation
KSilambharasanSF4548 Jul 10, 2026
747d9da
Add section on annotation types to overview
KSilambharasanSF4548 Jul 10, 2026
e6e4bd9
Fix image paths in Coordinates-Conversion.md
KSilambharasanSF4548 Jul 10, 2026
6634016
Refactor Custom Bookmarks documentation
KSilambharasanSF4548 Jul 10, 2026
37c7bf3
Fix typo in custom bookmark note
KSilambharasanSF4548 Jul 10, 2026
87b0fbf
Update Document-Link-Annotations.md for clarity
KSilambharasanSF4548 Jul 10, 2026
3c15260
Update Document-Outline.md to remove code snippets
KSilambharasanSF4548 Jul 10, 2026
83f218c
Include code examples for comment panel visibility
KSilambharasanSF4548 Jul 10, 2026
f206d58
Update DocumentLoadNotifications.md to remove examples
KSilambharasanSF4548 Jul 10, 2026
a7482b4
Update Form-Filling-Collection.md to remove code snippet
KSilambharasanSF4548 Jul 10, 2026
bfb6bdf
Remove code examples for form field events
KSilambharasanSF4548 Jul 10, 2026
45c6ab0
Fix formatting issue in Form-Filling-Events.md
KSilambharasanSF4548 Jul 10, 2026
357d75f
Update Form-Filling-Import-Export.md to remove code details
KSilambharasanSF4548 Jul 10, 2026
bc1476f
Fix note formatting in Form-Filling-Import-Export.md
KSilambharasanSF4548 Jul 10, 2026
334ebb7
Update Form-Filling-Overview.md to remove code snippet
KSilambharasanSF4548 Jul 10, 2026
d6eb4ef
Update Free Text annotations documentation
KSilambharasanSF4548 Jul 10, 2026
aef43b7
Fix formatting in Free-Text.md note section
KSilambharasanSF4548 Jul 10, 2026
471b9f6
Addressed all feedbacks
KSilambharasanSF4548 Jul 10, 2026
584cb9f
Addressed feedbacks
KSilambharasanSF4548 Jul 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ keywords: .net maui pdf viewer, .net maui view pdf, pdf viewer in .net maui, .ne

# Add, Remove, and Edit Annotations

This section will review the various functions in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) for adding, removing, and editing annotations in a PDF document.
This section explains the various functions in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) for adding, removing, and editing annotations in a PDF document.

## Add annotations to a PDF document

This section will go through how to add annotations to a PDF document programmatically.
This section explains how to add annotations to a PDF document programmatically.

### Add annotations programmatically

You can add a new annotation to the PDF document programmatically by creating an annotation instance and providing it as a parameter to the [AddAnnotation](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_AddAnnotation_Syncfusion_Maui_PdfViewer_Annotation_) method. The following example shows how to create an instance of a circle annotation and add it to the PDF document. Similarly, you can create and add other types of annotations.
You can add a new annotation to the PDF document programmatically by creating an annotation instance and providing it as a parameter to the [AddAnnotation](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_AddAnnotation_Syncfusion_Maui_PdfViewer_Annotation_) method. The following example shows how to create an instance of a circle annotation and add it to the PDF document. Similarly, you can create and add other types of annotations. For more information on the available annotation types, refer to the [Annotations Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/annotations-overview).

{% tabs %}
{% highlight c# %}
Expand Down Expand Up @@ -65,7 +65,7 @@ private void OnAnnotationAdded(object sender, AnnotationEventArgs e)

## Remove annotations from the PDF document

This section will go through different methods of removing annotations from a PDF document.
This section explains different methods of removing annotations from a PDF document.

### Remove a specific annotation

Expand Down Expand Up @@ -174,11 +174,11 @@ private void OnAnnotationEdited(object sender, AnnotationEventArgs e)
{% endhighlight %}
{% endtabs %}

### Adding custom information to an annotation
## Adding custom information to an annotation

The [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) allows you to assign custom information to annotations. The [CustomData](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.Annotation.html#Syncfusion_Maui_PdfViewer_Annotation_CustomData) property is utilized to store additional information about each annotation instance for reference. However, it's essential to note that these data are solely intended for reference purposes and will not be displayed in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) interface.
The [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) allows you to assign custom information to annotations. The [CustomData](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.Annotation.html#Syncfusion_Maui_PdfViewer_Annotation_CustomData) property is utilized to store additional information about each annotation instance for reference. However, it's essential to note that this data is solely intended for reference purposes and will not be displayed in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) interface.

The provided code sample illustrates how to set the [CustomData](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.Annotation.html#Syncfusion_Maui_PdfViewer_Annotation_CustomData) property for an annotation. Within this code sample, we set the custom data to represent the creation date of the annotation.
The provided code sample illustrates how to set the [CustomData](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.Annotation.html#Syncfusion_Maui_PdfViewer_Annotation_CustomData) property for an annotation. In this code sample, the custom data is set to represent the creation date of the annotation.

{% tabs %}
{% highlight C# %}
Expand All @@ -196,3 +196,9 @@ private void OnAnnotationAdded(object sender, AnnotationEventArgs e)
- [Select and Deselect Annotations](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/select-deselect-annotations)
- [Import and Export Annotations](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/import-export-annotations)
- [Undo and Redo](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/undo-redo)
- [Shapes](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/shapes)
- [Text Markups](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/text-markups)
- [Ink](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/ink)
- [Signature](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/signature)
- [Stamps](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/stamps)
- [Save a Document](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/save-a-document)
17 changes: 10 additions & 7 deletions Document-Processing/PDF/PDF-Viewer/maui/Annotation-Collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ keywords: .net maui pdf viewer, .net maui view pdf, pdf viewer in .net maui, .ne

# Annotation Collection in .NET MAUI PDF Viewer (SfPdfViewer)

The existing annotations in a PDF document can be accessed using the [Annotations](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_Annotations) property of the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html). This read only property will have the annotation collection information as soon as the document is loaded into the PDF Viewer. The following example explains how to use the property to obtain information about a square annotation that is the first on a specific document.
The existing annotations in a PDF document can be accessed using the [Annotations](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_Annotations) property of the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html). This read-only property will have the annotation collection information as soon as the document is loaded into the PDF Viewer.
The following example explains how to use the property to obtain information about the first annotation in a specific document.

{% tabs %}
{% highlight c# %}
Expand Down Expand Up @@ -42,7 +43,7 @@ private void OnDocumentLoaded(object sender, EventArgs e)
{% endtabs %}

## AnnotationsLoaded event
The [AnnotationsLoaded](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_AnnotationsLoaded) event occurs after all annotations in the PDF have finished loading, either when the document is opened or when annotations are imported. You can use this event to perform actions once annotations are fully available in the viewer.
The [AnnotationsLoaded](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_AnnotationsLoaded) event occurs after all annotations in the PDF have finished loading, either when the document is opened or when annotations are imported. The `AnnotationsLoaded` event fires after the [DocumentLoaded](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentLoaded) event, once all annotations are fully available in the viewer. You can use this event to perform actions once annotations are fully available in the viewer.
The following example explains how to wire and handle the event.

{% tabs %}
Expand All @@ -51,10 +52,10 @@ The following example explains how to wire and handle the event.
void WireAnnotationsLoadedEvent()
{
// Wire the annotations loaded event of [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html).
pdfViewer.AnnotationsLoaded += OnAnnotationsLoaded;
PdfViewer.AnnotationsLoaded += OnAnnotationsLoaded;
}

private void OnAnnotationsLoaded(object? sender, EventArgs e)
private void OnAnnotationsLoaded(object sender, EventArgs e)
{
Debug.WriteLine("All annotations have been loaded.");
}
Expand All @@ -63,6 +64,8 @@ private void OnAnnotationsLoaded(object? sender, EventArgs e)
{% endtabs %}

## See Also
- [Add, Remove, and Modify Annotations](../add-remove-modify-annotations)
- [Annotations Overview](../annotations-overview)
- [Select and Deselect Annotations](../select-deselect-annotations)
- [Add, Remove, and Edit Annotations](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/add-remove-modify-annotations)
- [Annotations Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/annotations-overview)
- [Select and Deselect Annotations](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/select-deselect-annotations)
- [Import and Export Annotations](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/import-export-annotations)
- [Undo and Redo](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/undo-redo)
48 changes: 28 additions & 20 deletions Document-Processing/PDF/PDF-Viewer/maui/Annotations-Comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The PDF Viewer control provides options to add, edit, and delete comments for th
6. Free text annotation
7. Signature annotation

## Showing/Hiding the Comment panel
## Showing or hiding the comment panel
The built-in Comment Panel in the PDF Viewer displays annotation comments. You can show or hide this panel using the [IsCommentsPanelVisible](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_IsCommentsPanelVisible) property. The default value of this property is false.
{% tabs %}
{% highlight c# %}
Expand All @@ -40,7 +40,7 @@ PdfViewer.IsCommentsPanelVisible = true;


## Comment panel
Annotation comments can be added to the PDF using the comment panel. Comment panel can be opened by using Built-in toolbar, In the toolbar you can see the comments button in the primary toolbar for desktop and top toolbar for mobile. The comment panel displays all annotations in the document along with their comments and replies, allowing you to add comments to any annotation and reply to existing comments or annotations.
Annotation comments can be added to the PDF using the comment panel. The comment panel can be opened using the built-in toolbar. In the toolbar, you can find the Comments button in the primary toolbar for desktop and in the top toolbar for mobile. The comment panel displays all annotations in the document along with their comments and replies, allowing you to add comments to any annotation and reply to existing comments or annotations.
The following image represents how to add the comments using the toolbar on the desktop.

![Annotations comments Built-in toolbar](Images/Annotations/desktop-comment.gif)
Expand All @@ -50,16 +50,16 @@ The following image represents how to add comments using the toolbar on mobile.
![Annotations comments Built-in toolbar](Images/Annotations/mobile-comment.gif)

## Adding comments or replies
Follow these steps to add comments or replies :
Follow these steps to add comments or replies:
1. Select the annotation in the PDF document and open the comment panel.
2. The corresponding comment thread is highlighted in the comment panel.
3. Add comments and replies using the comment panel.
4. Using the reply button in the comment panel, you can add a comment directly to a specific annotation, ensuring the discussion stays linked to that annotation.
3. Add a comment using the comment input area.
4. To reply to an existing comment or annotation, use the Reply button in the comment panel. This keeps the discussion linked to that annotation.
5. Multiple replies can be added to a comment.

## Add comments or replies programmatically
These can add comments or replies to existing annotations programmatically by accessing the specific annotation from the Annotations collection. This allows you to enhance collaboration and provide feedback directly within the PDF.
The following example explains how to add comments or replies to specific annotations in the PDF document.
You can add comments or replies to existing annotations programmatically by accessing the specific annotation from the Annotations collection. This allows you to enhance collaboration and provide feedback directly within the PDF.
The following example explains how to add comments or replies to a specific annotation in the PDF document.

{% tabs %}
{% highlight c# %}
Expand All @@ -77,22 +77,30 @@ annotation.Comments.Add(comment);
{% endhighlight %}
{% endtabs %}

## Editing the comments and comments replies of the annotations
Comments and replies can be edited through the context menu available under the More Options in the Comment Panel. Follow the steps below:
Select the annotation comment in the comment panel.

1. Click More options in the comment or reply to container.
2. Select Edit from the context menu.
3. An editable text box appears. Change the content of the comment or reply.
## Editing comments and replies
Comments and replies can be edited through the context menu available under More Options in the Comment Panel. Follow the steps below:
1. Select the annotation comment in the comment panel.
2. Click More Options in the comment or reply container.
3. Select Edit from the context menu.
4. An editable text box appears. Change the content of the comment or reply.

## Delete Comment or Comment Replies
Comments and replies can be deleted through the context menu available under the More Options in the Comment Panel. Follow the steps below:
## Deleting comments and replies
Comments and replies can be deleted through the context menu available under More Options in the Comment Panel. Follow the steps below:
1. Select the annotation comment in the comment panel.
2. Click More options in the comment or reply to container.
2. Click More Options in the comment or reply container.
3. Select Delete from the context menu.

**Note :** Deleting the root comment from the comment panel also deletes the associated annotation.
**Note:** Deleting the root comment from the comment panel also deletes the associated annotation.

## See Also
- [Add, Remove, and Modify Annotations](../add-remove-modify-annotations)
- [Annotations Overview](../annotations-overview)
- [Add, Remove, and Edit Annotations](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/add-remove-modify-annotations)
- [Annotations Overview](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/annotations-overview)
- [Annotation Collection](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/annotation-collection)
- [Ink](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/ink)
- [Shapes](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/shapes)
- [Stamps](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/stamps)
- [Sticky Notes](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/sticky-notes)
- [Free Text](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/free-text)
- [Text Markups](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/text-markups)
- [Signature](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/signature)
- [Toolbar](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/maui/toolbar)
Loading