You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MAUI/PDF-Viewer/Add-Remove-Modify-Annotations.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,15 @@ control: SfPdfViewer
7
7
documentation: ug
8
8
---
9
9
10
-
# Add, Remove and Edit Annotations
10
+
# Add, Remove and Edit Annotations in .NET MAUI PDF Viewer (SfPdfViewer)
11
11
12
12
This section will go through the various functions available in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) for adding, removing and editing annotations in a PDF document.
13
13
14
-
## Add Annotations to a PDF Document
14
+
## Add annotations to a PDF document
15
15
16
16
This section will go through how to add annotations to a PDF document programmatically.
17
17
18
-
### Add Annotations Programmatically
18
+
### Add annotations programmatically
19
19
20
20
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` 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 annotation.
21
21
@@ -42,7 +42,7 @@ void AddCircleAnnotation()
42
42
{% endhighlight %}
43
43
{% endtabs %}
44
44
45
-
### Annotation Added Event
45
+
### AnnotationAdded event
46
46
47
47
The `AnnotationAdded` event occurs when an annotation is added successfully to the PDF document. The following example explains how to wire and handle the event.
This section will go through different methods of removing annotations from a PDF document.
68
68
69
-
### Remove the Selected Annotation
69
+
### Remove the selected annotation
70
70
71
71
You can remove the selected annotation programmatically by providing the selected annotation instance as the parameter to `RemoveAnnotation` method. The selected annotation instance may be obtained from the `AnnotationSelected` event. The following example shows how to remove the selected annotation.
In desktop platforms like macOS and Windows, you can also use the keyboard shortcut `Delete` to remove the selected annotation from the PDF document directly.
88
88
89
-
### Remove Specific Annotation
89
+
### Remove a specific annotation
90
90
91
91
You can remove an annotation from the document programmatically by providing the specific annotation instance as the parameter to `RemoveAnnotation` method of `SfPdfViewer`. The following example shows how to remove the first annotation in the annotation collection from a PDF document.
92
92
@@ -106,7 +106,7 @@ void RemoveFirstAnnotation()
106
106
{% endhighlight %}
107
107
{% endtabs %}
108
108
109
-
### Remove all the Annotations
109
+
### Remove all the annotations
110
110
111
111
You can remove all the annotations from a document programmatically by calling `RemoveAllAnnotations` method. The following example shows how to remove all the annotations from a PDF document.
112
112
@@ -120,7 +120,7 @@ void RemoveAllAnnotations()
120
120
{% endhighlight %}
121
121
{% endtabs %}
122
122
123
-
### Annotation Removed Event
123
+
### AnnotationRemoved event
124
124
125
125
The `AnnotationRemoved` event occurs when an annotation is removed successfully from the PDF document. The following example explains how to wire and handle the event.
This section will go through different methods of editing annotations in a PDF document programmatically.
146
146
147
-
### Editing a Specific Annotation
147
+
### Edit a specific annotation
148
148
149
149
You can edit the properties of an annotation from the document programmatically by accessing the specific annotation instance from the `Annotations` property of the SfPdfViewer. The following example shows how to edit the first annotation in the annotation collection. Similarly, you can modify the other properties also.
150
150
@@ -173,7 +173,7 @@ void EditFirstAnnotation()
173
173
{% endhighlight %}
174
174
{% endtabs %}
175
175
176
-
### Editing the Selected Annotation
176
+
### Edit the selected annotation
177
177
178
178
You can edit the properties of the selected annotation programmatically by accessing the selected annotation instance. The selected annotation instance may be obtained from the `AnnotationSelected` event. The following example shows how to edit the selected annotation assuming that the annotation is a circle type.
Copy file name to clipboardExpand all lines: MAUI/PDF-Viewer/Annotation-Collection.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ control: SfPdfViewer
7
7
documentation: ug
8
8
---
9
9
10
-
# Annotation Collection
10
+
# Annotation Collection in .NET MAUI PDF Viewer (SfPdfViewer)
11
11
12
12
The existing annotations in a PDF document can be accessed using the `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 the information about a square annotation that is the first on a specific document.
Copy file name to clipboardExpand all lines: MAUI/PDF-Viewer/Annotations-Overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ control: SfPdfViewer
7
7
documentation: ug
8
8
---
9
9
10
-
# Annotations
10
+
# Annotations in .NET MAUI PDF Viewer (SfPdfViewer)
11
11
12
12
The [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) allows you to add, remove and modify annotations in the PDF documents. This section will go through the various annotation types available in PDF Viewer.
Copy file name to clipboardExpand all lines: MAUI/PDF-Viewer/Document-Link-Annotations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ control: SfPdfViewer
7
7
documentation: ug
8
8
---
9
9
10
-
# Document link navigation
10
+
# Document Link Navigation in .NET MAUI PDF Viewer (SfPdfViewer)
11
11
12
12
The PDF viewer allows navigating from one part of the PDF document to another using document link annotations. When a document link annotation is tapped, the PDF viewer scrolls to its destination. This type of link annotations is most often used to represent the table of contents of a PDF document.
Copy file name to clipboardExpand all lines: MAUI/PDF-Viewer/DocumentLoadNotifications.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
2
layout: post
3
-
title: Document Load Notifications in .NET MAUI PDF Viewer control | Syncfusion
3
+
title: Document Load Events in .NET MAUI PDF Viewer control | Syncfusion
4
4
description: Learn here all about events that notifies whether the document has been opened or not opened in the Syncfusion .NET MAUI PDF Viewer (SfPdfViewer).
5
5
platform: MAUI
6
6
control: SfPdfViewer
7
7
documentation: ug
8
8
---
9
9
10
-
# Document Load Notifications in .NET MAUI PDF Viewer (SfPdfViewer)
10
+
# Document Load Events in .NET MAUI PDF Viewer (SfPdfViewer)
11
11
12
12
The [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) supports the [DocumentLoaded](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentLoaded) and [DocumentLoadFailed](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentLoadFailed) events to notify whether the document has been opened and displayed in the view or not.
13
13
@@ -62,17 +62,17 @@ The [DocumentLoadFailedEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion
title: Gesture events in .NET MAUI PDF Viewer control | Syncfusion
4
+
description: This guide discusses about the gesture events provided by Syncfusion .NET MAUI PDF Viewer (SfPdfViewer) control.
5
+
platform: MAUI
6
+
control: SfPdfViewer
7
+
documentation: ug
8
+
---
9
+
10
+
# Gesture Events in .NET MAUI PDF Viewer (SfPdfViewer)
11
+
12
+
## Tapped event
13
+
14
+
The `SfPdfViewer` provides a `Tapped` event that occurs when a tap gesture is detected in the control and allows you to perform custom actions when a tap occurs. This event provides information about the page number and position at the tapped location through the `GestureEventArgs`.
15
+
The following code example demonstrates how to subscribe to the `Tapped` event.
In the above example, the `PdfViewer_Tapped` method is registered as the event handler for the Tapped event of the `SfPdfViewer`. The `PdfViewer_Tapped` method will be invoked whenever a tap occurs on the PDF Viewer. You can handle the custom action in the method as demonstrated in the following code example.
The `GesturEventArgs` provides information available on the tapped location and it includes the following properties.
42
+
43
+
1.`PageNumber` – This property returns the page number on which the tap took place. The value ranges from 1 to the total number of pages in the PDF document. If the tap occurs outside of any PDF page boundaries, the result will be -1.
44
+
2.`PagePositon` – The property returns the page’s tapped position in the PDF coordinates. The coordinates have their origin at the top-left of the page. The number of the tapped page is identified by the `PageNumber` property. If the tap occurs outside of any PDF page boundaries, the result will be (-1, -1).
45
+
3.`Position` – This property returns the tapped position on the PDF Viewer control. The coordinate space starts at the top left of the control.
46
+
47
+
The following code example that demonstrates how to retrieve information from the `GestureEventArgs` and handle the tapped event.
Copy file name to clipboardExpand all lines: MAUI/PDF-Viewer/Import-Export-Annotations.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ control: SfPdfViewer
7
7
documentation: ug
8
8
---
9
9
10
-
# Import and Export Annotations
10
+
# Import and Export Annotations in .NET MAUI PDF Viewer (SfPdfViewer)
11
11
12
12
This section will go through the various functions available in the `SfPdfViewer` to import and export annotations in a PDF document.
13
13
14
-
## Import Annotations
14
+
## Import annotations
15
15
16
16
You can add annotations to a PDF document by importing them from FDF and XFDF files by using the `ImportAnnotations` method. You need to provide the stream of the file containing the annotations and the data format information as parameters to the method. The following example explains how to import annotations from an XFDF file, assuming that the file is in the application’s data directory.
0 commit comments