diff --git a/MAUI/PDF-Viewer/Add-Remove-Modify-Annotations.md b/MAUI/PDF-Viewer/Add-Remove-Modify-Annotations.md index a92d4f3eb3..eb032d3138 100644 --- a/MAUI/PDF-Viewer/Add-Remove-Modify-Annotations.md +++ b/MAUI/PDF-Viewer/Add-Remove-Modify-Annotations.md @@ -7,15 +7,15 @@ control: SfPdfViewer documentation: ug --- -# Add, Remove and Edit Annotations +# Add, Remove and Edit Annotations in .NET MAUI PDF Viewer (SfPdfViewer) 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. -## Add Annotations to a PDF Document +## Add annotations to a PDF document This section will go through how to add annotations to a PDF document programmatically. -### Add Annotations 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` 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. @@ -42,7 +42,7 @@ void AddCircleAnnotation() {% endhighlight %} {% endtabs %} -### Annotation Added Event +### AnnotationAdded event 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. @@ -62,11 +62,11 @@ private void OnAnnotationAdded(object sender, AnnotationEventArgs e) {% endhighlight %} {% endtabs %} -## Remove Annotations from the PDF Document +## Remove annotations from the PDF document This section will go through different methods of removing annotations from a PDF document. -### Remove the Selected Annotation +### Remove the selected annotation 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. @@ -86,7 +86,7 @@ void RemoveSelectedAnnotation(Annotation selectedAnnotation) 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. -### Remove Specific Annotation +### Remove a specific annotation 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. @@ -106,7 +106,7 @@ void RemoveFirstAnnotation() {% endhighlight %} {% endtabs %} -### Remove all the Annotations +### Remove all the annotations 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. @@ -120,7 +120,7 @@ void RemoveAllAnnotations() {% endhighlight %} {% endtabs %} -### Annotation Removed Event +### AnnotationRemoved event 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. @@ -140,11 +140,11 @@ private void OnAnnotationRemoved(object sender, AnnotationEventArgs e) {% endhighlight %} {% endtabs %} -## Editing Annotations +## Edit annotations This section will go through different methods of editing annotations in a PDF document programmatically. -### Editing a Specific Annotation +### Edit a specific annotation 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. @@ -173,7 +173,7 @@ void EditFirstAnnotation() {% endhighlight %} {% endtabs %} -### Editing the Selected Annotation +### Edit the selected annotation 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. @@ -200,7 +200,7 @@ void EditSelectedAnnotation(Annotation selectedAnnotation) {% endhighlight %} {% endtabs %} -### Annotation Edited Event +### AnnotationEdited event The `AnnotationEdited` event occurs when an annotation is edited in the PDF document. The following example explains how to wire and handle the event. diff --git a/MAUI/PDF-Viewer/Annotation-Collection.md b/MAUI/PDF-Viewer/Annotation-Collection.md index c491e5254a..f3dc047074 100644 --- a/MAUI/PDF-Viewer/Annotation-Collection.md +++ b/MAUI/PDF-Viewer/Annotation-Collection.md @@ -7,7 +7,7 @@ control: SfPdfViewer documentation: ug --- -# Annotation Collection +# Annotation Collection in .NET MAUI PDF Viewer (SfPdfViewer) 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. diff --git a/MAUI/PDF-Viewer/Annotations-Overview.md b/MAUI/PDF-Viewer/Annotations-Overview.md index b0cfe6c45c..2bf4a38198 100644 --- a/MAUI/PDF-Viewer/Annotations-Overview.md +++ b/MAUI/PDF-Viewer/Annotations-Overview.md @@ -7,7 +7,7 @@ control: SfPdfViewer documentation: ug --- -# Annotations +# Annotations in .NET MAUI PDF Viewer (SfPdfViewer) 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. diff --git a/MAUI/PDF-Viewer/Document-Link-Annotations.md b/MAUI/PDF-Viewer/Document-Link-Annotations.md index add510df99..f53f34f6bb 100644 --- a/MAUI/PDF-Viewer/Document-Link-Annotations.md +++ b/MAUI/PDF-Viewer/Document-Link-Annotations.md @@ -7,7 +7,7 @@ control: SfPdfViewer documentation: ug --- -# Document link navigation +# Document Link Navigation in .NET MAUI PDF Viewer (SfPdfViewer) 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. diff --git a/MAUI/PDF-Viewer/DocumentLoadNotifications.md b/MAUI/PDF-Viewer/DocumentLoadNotifications.md index dadbd36fb1..b55654da32 100644 --- a/MAUI/PDF-Viewer/DocumentLoadNotifications.md +++ b/MAUI/PDF-Viewer/DocumentLoadNotifications.md @@ -1,13 +1,13 @@ --- layout: post -title: Document Load Notifications in .NET MAUI PDF Viewer control | Syncfusion +title: Document Load Events in .NET MAUI PDF Viewer control | Syncfusion 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). platform: MAUI control: SfPdfViewer documentation: ug --- -# Document Load Notifications in .NET MAUI PDF Viewer (SfPdfViewer) +# Document Load Events in .NET MAUI PDF Viewer (SfPdfViewer) 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. @@ -62,17 +62,17 @@ The [DocumentLoadFailedEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion {% tabs %} {% highlight XAML hl_lines="3" %} - + {% endhighlight %} {% highlight C# %} - private void PdfViewer_DocumentLoadFailed(object sender, DocumentLoadFailedEventArgs e) - { - DisplayAlert( e.Message, e.Exception.StackTrace, "OK"); - } +private void PdfViewer_DocumentLoadFailed(object sender, DocumentLoadFailedEventArgs e) +{ + DisplayAlert( e.Message, e.Exception.StackTrace, "OK"); +} {% endhighlight %} {% endtabs %} @@ -84,24 +84,24 @@ The `DocumentLoadFailed` event allows you to handle the load failures at the app {% tabs %} {% highlight XAML hl_lines="3" %} - + {% endhighlight %} {% highlight C# hl_lines="4" %} - public MainPage() - { - InitializeComponent(); - PdfViewer.DocumentLoadFailed += PdfDocumentLoadFailed; - } - - private void PdfDocumentLoadFailed(object sender, DocumentLoadFailedEventArgs e) - { - e.Handled = true; - // Handle your logic here. - } +public MainPage() +{ + InitializeComponent(); + PdfViewer.DocumentLoadFailed += PdfDocumentLoadFailed; +} + +private void PdfDocumentLoadFailed(object sender, DocumentLoadFailedEventArgs e) +{ + e.Handled = true; + // Handle your logic here. +} {% endhighlight %} {% endtabs %} \ No newline at end of file diff --git a/MAUI/PDF-Viewer/Gesture-Events.md b/MAUI/PDF-Viewer/Gesture-Events.md new file mode 100644 index 0000000000..ea8009268f --- /dev/null +++ b/MAUI/PDF-Viewer/Gesture-Events.md @@ -0,0 +1,63 @@ +--- +layout: post +title: Gesture events in .NET MAUI PDF Viewer control | Syncfusion +description: This guide discusses about the gesture events provided by Syncfusion .NET MAUI PDF Viewer (SfPdfViewer) control. +platform: MAUI +control: SfPdfViewer +documentation: ug +--- + +# Gesture Events in .NET MAUI PDF Viewer (SfPdfViewer) + +## Tapped event + +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`. +The following code example demonstrates how to subscribe to the `Tapped` event. + +{% tabs %} +{% highlight xaml %} + +{% endhighlight %} + +{% highlight c# %} +SfPdfViewer PdfViewer = new SfPdfViewer(); +PdfViewer.Tapped += PdfViewer_Tapped; +{% endhighlight %} +{% endtabs %} + +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. + +{% tabs %} +{% highlight c# %} +private void PdfViewer_Tapped(object sender, GestureEventArgs e) +{ + // Handle the tap event here. +} +{% endhighlight %} +{% endtabs %} + +### GestureEventArgs + +The `GesturEventArgs` provides information available on the tapped location and it includes the following properties. + +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. +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). +3. `Position` – This property returns the tapped position on the PDF Viewer control. The coordinate space starts at the top left of the control. + +The following code example that demonstrates how to retrieve information from the `GestureEventArgs` and handle the tapped event. + +{% tabs %} +{% highlight c# %} +private void PdfViewer_Tapped(object sender, GestureEventArgs e) +{ + // To get the pointer position on the control where the tap occurred. + var pointerPosition = e.Position; + // To get the page number where the tap occurred. + var pageNumber = e.PageNumber; + // To get the page position where the tap occurred. + var pagePoistion = e.PagePosition; + + // Handle the tap event here with the above information if required. +} +{% endhighlight %} +{% endtabs %} \ No newline at end of file diff --git a/MAUI/PDF-Viewer/Hyperlink-Navigation.md b/MAUI/PDF-Viewer/Hyperlink-Navigation.md index 9636e951e9..2bd6ea26f5 100644 --- a/MAUI/PDF-Viewer/Hyperlink-Navigation.md +++ b/MAUI/PDF-Viewer/Hyperlink-Navigation.md @@ -18,24 +18,24 @@ The [HyperlinkClicked](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfVi {% tabs %} {% highlight XAML hl_lines="3" %} - + {% endhighlight %} {% highlight C# hl_lines="4" %} - public MainPage() - { - InitializeComponent(); - PdfViewer.HyperlinkClicked += PdfHyperlinkClicked; - } - - private async void PdfHyperlinkClicked(object sender, HyperlinkClickedEventArgs e) - { - e.Handled = true; - await Browser.Default.OpenAsync(e.Uri, BrowserLaunchMode.SystemPreferred); - } +public MainPage() +{ + InitializeComponent(); + PdfViewer.HyperlinkClicked += PdfHyperlinkClicked; +} + +private async void PdfHyperlinkClicked(object sender, HyperlinkClickedEventArgs e) +{ + e.Handled = true; + await Browser.Default.OpenAsync(e.Uri, BrowserLaunchMode.SystemPreferred); +} {% endhighlight %} {% endtabs %} @@ -47,14 +47,14 @@ Enable or disable the recognition of hyperlinks in PDF documents using the [Enab {% tabs %} {% highlight XAML %} - + {% endhighlight %} {% highlight C# %} - PdfViewer.EnableHyperlinkNavigation = false; +PdfViewer.EnableHyperlinkNavigation = false; {% endhighlight %} {% endtabs %} \ No newline at end of file diff --git a/MAUI/PDF-Viewer/Images/Text-Selection/text_selection.gif b/MAUI/PDF-Viewer/Images/Text-Selection/text_selection.gif new file mode 100644 index 0000000000..6b162dd992 Binary files /dev/null and b/MAUI/PDF-Viewer/Images/Text-Selection/text_selection.gif differ diff --git a/MAUI/PDF-Viewer/Images/Text-Selection/text_selection_mouse.gif b/MAUI/PDF-Viewer/Images/Text-Selection/text_selection_mouse.gif new file mode 100644 index 0000000000..a04340faf2 Binary files /dev/null and b/MAUI/PDF-Viewer/Images/Text-Selection/text_selection_mouse.gif differ diff --git a/MAUI/PDF-Viewer/Import-Export-Annotations.md b/MAUI/PDF-Viewer/Import-Export-Annotations.md index c4b3b2fafd..4b1b03ce08 100644 --- a/MAUI/PDF-Viewer/Import-Export-Annotations.md +++ b/MAUI/PDF-Viewer/Import-Export-Annotations.md @@ -7,11 +7,11 @@ control: SfPdfViewer documentation: ug --- -# Import and Export Annotations +# Import and Export Annotations in .NET MAUI PDF Viewer (SfPdfViewer) This section will go through the various functions available in the `SfPdfViewer` to import and export annotations in a PDF document. -## Import Annotations +## Import annotations 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. @@ -90,4 +90,4 @@ void ExportSpecificAnnotations() {% endhighlight %} {% endtabs %} -* Similarly, you may export specific list of annotations into an FDF file. \ No newline at end of file +* Similarly, you may export specific list of annotations into an FDF file. diff --git a/MAUI/PDF-Viewer/Ink.md b/MAUI/PDF-Viewer/Ink.md index e6ae6f8e44..5d54654324 100644 --- a/MAUI/PDF-Viewer/Ink.md +++ b/MAUI/PDF-Viewer/Ink.md @@ -7,15 +7,15 @@ control: SfPdfViewer documentation: ug --- -# Ink Annotation +# Ink Annotation in .NET MAUI PDF Viewer (SfPdfViewer) -The ink annotation feature of SfPdfViewer allows you to add, remove and modify free hand drawings (ink) in the PDF document. This is useful for making corrections or emphasizing important points in the document. This section will go through the various functions available in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) for working with ink annotations. +The ink annotation feature of `SfPdfViewer` allows you to add, remove and modify free hand drawings (ink) in the PDF document. This is useful for making corrections or emphasizing important points in the document. This section will go through the various functions available in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) for working with ink annotations. -## Adding Ink Annotations +## Add ink annotations This section will go through how to add ink annotations to a PDF document interactively by drawing on the PDF document as well as programmatically. -## Adding annotation with UI interaction +## Add ink annotation with UI interaction You can draw and add ink annotations to a PDF document with UI interaction using touch or mouse. The following steps explains how to draw ink annotation on a PDF. @@ -64,7 +64,7 @@ void DisableInkDrawingMode() {% endhighlight %} {% endtabs %} -## Adding Annotations Programmatically +## Add ink annotations programmatically You can create and add an ink annotation to a PDF document programmatically using the `AddAnnotation` method of the `SfPdfViewer`. The following example explains how to create an ink annotation and add it to the first page of a PDF document. @@ -103,11 +103,11 @@ void AddInkAnnotation() {% endhighlight %} {% endtabs %} -## Annotation Settings +## Annotation settings In the ink annotation mode, the ink annotation will be drawn with a default appearance and behavior. You can modify the annotation after it has been added to the pages. However, if you need to define the appearance and behavior before drawing on the document, you can change its default settings using the `AnnotationSettings` property of the `SfPdfViewer`. -### Customize the Default Appearance +### Customize the default appearance You can customize the default appearance of ink annotation using the `InkAnnotationSettings`. The following example explains how to obtain the default ink annotation settings and modify its appearance properties. Similarly, you can modify other available properties also. @@ -126,7 +126,7 @@ void CustomizeDefaultInkSettings() {% endhighlight %} {% endtabs %} -### Consider Strokes as Individual Ink Annotations +### Consider each stroke as a separate ink annotation When drawing ink annotations on a PDF document interactively, all the strokes that are created during a session are treated as a single ink annotation. The session here refers to the duration between enabling and disabling the ink drawing mode. However, if you wish to consider each stroke as an individual ink annotation, set the `AggregateInkStrokes` property of the default ink annotation settings to `false`. This allows you to access and modify individual strokes. The following example explains how to access the default ink annotation settings and set the property to `false`. @@ -143,7 +143,7 @@ void DisableAggregateInkStrokes() {% endhighlight %} {% endtabs %} -## Edit the Selected Annotation +## Edit the selected ink annotation You can edit the properties of the selected ink 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 some of the properties of the selected ink annotation. Similar you can modify the other properties. diff --git a/MAUI/PDF-Viewer/Keyboard-Shortcuts.md b/MAUI/PDF-Viewer/Keyboard-Shortcuts.md index 2e175772a7..610cc19b1c 100644 --- a/MAUI/PDF-Viewer/Keyboard-Shortcuts.md +++ b/MAUI/PDF-Viewer/Keyboard-Shortcuts.md @@ -7,7 +7,7 @@ control: SfPdfViewer documentation: ug --- -# Keyboard shortcuts +# Keyboard shortcuts in .NET MAUI PDF Viewer (SfPdfViewer) The PDF viewer allows the users to perform certain operations such as page navigation using keyboard shortcuts in Windows and macOS platforms. The below table lists the available shortcuts and the corresponding operations. @@ -73,10 +73,6 @@ The PDF viewer allows the users to perform certain operations such as page navig Submits the password entered in the built-in password dialog. Ignored if the password dialog is not showing -Esc -Closes the currently showing built-in dialog if any - - Home Scrolls to the top. @@ -130,11 +126,16 @@ The PDF viewer allows the users to perform certain operations such as page navig Ctrl + y -Redo – Restores the last undone function +Redo – Restores the last undone action Esc -Deselects the currently selected annotation + +
    +
  • Closes the currently showing built-in dialog.
  • +
  • Deselects the currently selected annotation.
  • +
+ @@ -143,4 +144,4 @@ The PDF viewer allows the users to perform certain operations such as page navig * The `Ctrl` + mouse wheel combinations for zooming are applicable only for Windows. There is no support for this combination in macOS. * In Windows, it is the default behavior of UI elements to receive notification of the key pressed event only when they are focused. So, while using keyboard shortcuts in Windows, please make sure that the PDF viewer control is focused by either tapping or clicking on it. -N> Use the `Command` key instead of the `Ctrl` key in macOS. \ No newline at end of file +N> Use the `Command` key instead of the `Ctrl` key in macOS. diff --git a/MAUI/PDF-Viewer/Lock-Unlock.md b/MAUI/PDF-Viewer/Lock-Unlock.md index 85a2afae8f..fa456c137e 100644 --- a/MAUI/PDF-Viewer/Lock-Unlock.md +++ b/MAUI/PDF-Viewer/Lock-Unlock.md @@ -7,11 +7,11 @@ control: SfPdfViewer documentation: ug --- -# Lock and Unlock Annotations +# Lock and Unlock Annotations in .NET MAUI PDF Viewer (SfPdfViewer) You can lock an annotation to prevent it from being edited. The annotation that has been locked cannot be removed or edited further until it is unlocked. This section will go through the process of locking and unlocking annotations in a PDF document. -## Lock All Annotations in a Document +## Lock all annotations in a document To lock all annotations in a document, set the `IsLocked` property of the `AnnotationSettings` to `true`. The following example explains how to lock all annotations in a document. @@ -27,26 +27,8 @@ void LockAllAnnotations() * Similarly, to unlock all the annotations, set the `IsLocked` property value to `false`. -## Lock Specific Annotation Types -You can also use the `AnnotationSettings` property to lock a specific annotation type in a document. The following example explains how to lock all the circle annotations in a document by accessing the circle annotation settings. Similarly, you can lock other types of annotation. - -{% tabs %} -{% highlight C# %} -void LockCircleAnnotations() -{ - // Obtain the default circle annotation settings using `SfPdfViewer` instance. - ShapeAnnotationSettings circleAnnotationSettings = PdfViewer.AnnotationSettings.Circle; - - // Lock all the circle annotations. - circleAnnotationSettings.IsLocked = true; -} -{% endhighlight %} -{% endtabs %} - -* Similarly, to unlock the specific annotation types, set the `IsLocked` property value to `false`. - -## Lock Specific Annotation +## Lock specific annotation To lock a specific annotation in a document, access the annotation instance and set the `IsLocked` property of the annotation to `true`. The following example explains how to lock the first annotation in a PDF document. @@ -68,7 +50,28 @@ void LockFirstAnnotation() * Similarly, to unlock the annotation, set the `IsLocked` property value to `false`. -## Lock the Selected Annotation + +## Lock specific annotation types + +You can also use the `AnnotationSettings` property to lock a specific annotation type in a document. The following example explains how to lock all the circle annotations in a document by accessing the circle annotation settings. Similarly, you can lock other types of annotation. + +{% tabs %} +{% highlight C# %} +void LockCircleAnnotations() +{ + // Obtain the default circle annotation settings using `SfPdfViewer` instance. + ShapeAnnotationSettings circleAnnotationSettings = PdfViewer.AnnotationSettings.Circle; + + // Lock all the circle annotations. + circleAnnotationSettings.IsLocked = true; +} +{% endhighlight %} +{% endtabs %} + +* Similarly, to unlock the specific annotation types, set the `IsLocked` property value to `false`. + + +## Lock the selected annotation To lock the selected annotation, access the selected annotation instance and set the `IsLocked` property of the annotation to `true`. The selected annotation instance may be obtained from the `AnnotationSelected` event. The following example explains how to lock the selected annotation in a PDF document. @@ -86,4 +89,4 @@ void LockSelectedAnnotation(Annotation selectedAnnotation) {% endhighlight %} {% endtabs %} -* Similarly, to unlock the selected annotation, set the `IsLocked` property value to `false`. \ No newline at end of file +* Similarly, to unlock the selected annotation, set the `IsLocked` property value to `false`. diff --git a/MAUI/PDF-Viewer/Migration.md b/MAUI/PDF-Viewer/Migration.md index dccb61dad0..2ee3c3acb5 100644 --- a/MAUI/PDF-Viewer/Migration.md +++ b/MAUI/PDF-Viewer/Migration.md @@ -76,12 +76,12 @@ To make migration from [Xamarin SfPdfViewer](https://www.syncfusion.com/xamarin- {{'[IsTextSelectionEnabled](https://help.syncfusion.com/cr/xamarin/Syncfusion.SfPdfViewer.XForms.SfPdfViewer.html#Syncfusion_SfPdfViewer_XForms_SfPdfViewer_IsTextSelectionEnabled)'| markdownify}} -EnableTextSelection +{{'[EnableTextSelection](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_EnableTextSelection)'| markdownify}} Gets or sets a value that indicates whether the text selection is enabled or not. The default value is true. {{'[TextSelectionColor](https://help.syncfusion.com/cr/xamarin/Syncfusion.SfPdfViewer.XForms.TextSelectionSettings.html#Syncfusion_SfPdfViewer_XForms_TextSelectionSettings_TextSelectionColor)'| markdownify}} -HighlightColor +{{'[HighlightColor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.TextSelectionSettings.html#Syncfusion_Maui_PdfViewer_TextSelectionSettings_HighlightColor)'| markdownify}} Gets or sets the color to highlight the selected text. The default value is Color.FromRgba(0, 0, 205, 80). @@ -118,7 +118,7 @@ To make migration from [Xamarin SfPdfViewer](https://www.syncfusion.com/xamarin- {{'[TextSelectionCompleted](https://help.syncfusion.com/cr/xamarin/Syncfusion.SfPdfViewer.XForms.SfPdfViewer.html#Syncfusion_SfPdfViewer_XForms_SfPdfViewer_TextSelectionCompleted)'| markdownify}} -TextSelectionChanged +{{'[TextSelectionChanged](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_TextSelectionChanged)'| markdownify}} Occurs when the text is selected or when the selected text is changed. @@ -172,7 +172,7 @@ To make migration from [Xamarin SfPdfViewer](https://www.syncfusion.com/xamarin- Description {{'[TextSelectionCompletedEventArgs](https://help.syncfusion.com/cr/xamarin/Syncfusion.SfPdfViewer.XForms.TextSelectionCompletedEventArgs.html)'| markdownify }} -TextSelectionChangedEventArgs +{{'[TextSelectionChangedEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.TextSelectionChangedEventArgs.html)'| markdownify}} Provides data for TextSelectionChanged event. diff --git a/MAUI/PDF-Viewer/Right-To-Left.md b/MAUI/PDF-Viewer/Right-To-Left.md index c19917aa1a..59380c1453 100644 --- a/MAUI/PDF-Viewer/Right-To-Left.md +++ b/MAUI/PDF-Viewer/Right-To-Left.md @@ -15,14 +15,14 @@ Setting the `FlowDirection` property to `RightToLeft` on the SfPdfViewer sets th {% tabs %} {% highlight XAML %} - + {% endhighlight %} {% highlight C# %} - PdfViewer.FlowDirection = FlowDirection.RightToLeft; +PdfViewer.FlowDirection = FlowDirection.RightToLeft; {% endhighlight %} {% endtabs %} diff --git a/MAUI/PDF-Viewer/Select-Deselect-Annotations.md b/MAUI/PDF-Viewer/Select-Deselect-Annotations.md index 6b173dc368..d871f5f306 100644 --- a/MAUI/PDF-Viewer/Select-Deselect-Annotations.md +++ b/MAUI/PDF-Viewer/Select-Deselect-Annotations.md @@ -7,17 +7,17 @@ control: SfPdfViewer documentation: ug --- -# Select and Deselct Annotations +# Select and Deselct Annotations in .NET MAUI PDF Viewer (SfPdfViewer) This section will go through the various functions available in the [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html) for selecting and deselecting annotations in a PDF document. -## Select an Annotation +## Select an annotation You can select an annotation by simply tapping on the annotation using touch or mouse. When the annotation is selected, the selection border (selector) appears, indicating that the annotation is selected. It also lets you move or resize the annotation if the actions are supported by the annotation type. The following image represents the circle annotation is selected. ![Selected annotation representation.](Images/Annotations/selected-circle.png) -### Select an Annotation Programmatically +### Select an annotation programmatically You can select an annotation programmatically by providing the annotation instance as the parameter to the `SelectAnnotation` method. The annotation instance can be found in the Annotations property of the `SfPdfViewer`. The following example explains how to select the first annotation in the annotation collection. @@ -34,7 +34,7 @@ void SelectAnnotation() {% endhighlight %} {% endtabs %} -### Customizing Selector Appearance +### Customizing selector appearance The `AnnotationSettings` property of SfPdfViewer allows you to customize the default selector color. The following example explains how to customize the selector color for locked and unlocked annotations. @@ -57,7 +57,7 @@ The following images represent the customized selector color of an unlocked and ![Selector color of a locked annotation.](Images/Annotations/selected-locked.png) -### Annotation Selected Event +### Annotation selected event The `AnnotationSelected` event occurs when an annotation is selected interactively or programmatically. The selected annotation instance will be provided through the `Annotation` property of the event arguments. The following example explains how to wire the event to obtain and modify the selected annotation properties. @@ -80,11 +80,11 @@ private void OnAnnotationSelected(object sender, AnnotationEventArgs e) {% endhighlight %} {% endtabs %} -## Deselect an Annotation +## Deselect an annotation You can deselect the selected annotation by simply tapping outside of it using touch or mouse. When the annotation is deselected, the selection border (selector) disappears, indicating that the annotation is deselected. -### Deselect an Annotation Programmatically +### Deselect an annotation programmatically You can deselect the annotation programmatically by providing the selected annotation instance as the parameter to `DeselectAnnotation` method. The selected annotation instance may be obtained from the `AnnotationSelected` event. The following example shows how to deselect the selected annotation. @@ -102,7 +102,7 @@ void DeselectAnnotation(Annotation selectedAnnotation) {% endhighlight %} {% endtabs %} -### Annotation Deselected Event +### Annotation deselected event The `AnnotationDeselected` event occurs when an annotation is selected interactively or programmatically. The following example explains how to wire the event to obtain the deselected annotation. diff --git a/MAUI/PDF-Viewer/Shapes.md b/MAUI/PDF-Viewer/Shapes.md index 928b54ba76..aef7c1d94b 100644 --- a/MAUI/PDF-Viewer/Shapes.md +++ b/MAUI/PDF-Viewer/Shapes.md @@ -7,11 +7,11 @@ control: SfPdfViewer documentation: ug --- -# Shape Annotations +# Shape Annotations in .NET MAUI PDF Viewer (SfPdfViewer) The shape annotations feature of `SfPdfViewer` allows you to add, remove and modify shapes in the PDF document. This is useful for making corrections or emphasizing important points in the document. This section will go through the various types and functions available in PDF Viewer for working with shape annotations. -## Types of Shapes +## Types of shapes The following shape annotation types are now available in the PDF Viewer. @@ -20,11 +20,11 @@ The following shape annotation types are now available in the PDF Viewer. 3. Line. 4. Square. -## Adding Annotations +## Add shapes to a PDF document This section will go through how to add shape annotations to a PDF document interactively by drawing on the PDF document as well as programmatically. -### Adding Annotations with UI Interaction +### Add shapes with UI interaction You can draw and add shape annotations to a PDF document interactively by touch (or mouse down) and drag. The following steps explains how to draw shape annotation on a PDF. @@ -69,7 +69,7 @@ void DisableCircleDrawingMode() {% endhighlight %} {% endtabs %} -### Adding Annotations Programmatically +### Add shapes programmatically You can create and add circle annotation to a PDF document programmatically using the `AddAnnotation` method of the `SfPdfViewer`. The following example explains how to create a circle annotation and add it to the first page of a PDF document. Similarly, you can add other shapes also. @@ -103,7 +103,7 @@ void AddCircleAnnotation() {% endhighlight %} {% endtabs %} -## Annotation Settings +## Shape annotation settings In the shape annotation mode, the shape annotations will be drawn with a default appearance. You can modify the annotation after it has been added to the pages. However, if you need to define the appearance before drawing on the document, you can change its default settings using the `AnnotationSettings` property of the `SfPdfViewer`. For that you need to obtain the default shape annotation settings. @@ -126,7 +126,7 @@ void CustomizeDefaultCircleSettings() {% endhighlight %} {% endtabs %} -## Edit the Selected Annotation +## Edit the selected shape annotation You can edit the properties of the selected shape 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 some of the properties of the selected circle annotation. Similarly, you can modify the other shape annotations properties. diff --git a/MAUI/PDF-Viewer/Stamps.md b/MAUI/PDF-Viewer/Stamps.md index 0626f5566d..ea0fe0988d 100644 --- a/MAUI/PDF-Viewer/Stamps.md +++ b/MAUI/PDF-Viewer/Stamps.md @@ -7,22 +7,22 @@ control: SfPdfViewer documentation: ug --- -# Stamp Annotations +# Stamp Annotations in .NET MAUI PDF Viewer (SfPdfViewer) The stamp annotations feature of `SfPdfViewer` allows you to add, remove and modify stamps or custom images in the PDF document. This section will go through the various types and functions available in PDF Viewer for working with stamp annotations. -## Types of Stamps +## Types of stamps The following stamp annotation types are now available in the PDF Viewer. 1. Standard (or built-in) stamps. 2. Custom (or image) stamps. -## Adding Stamps +## Add stamps to a PDF document This section will go through how to add stamp annotations to a PDF document programmatically to a PDF document. -### Adding Standard Stamps +### Add standard stamps There are 18 standard stamp types are available in the `SfPdfViewer` that are most commonly used in documents. The appropriate standard stamp type can be selected from the `StampType` enumeration. @@ -58,7 +58,7 @@ The following image represents the approved standard stamp appearance in the PDF ![Standard Approved Stamp.](Images/Annotations/approved-stamp.png) -### Adding custom stamps +### Add custom stamps You can create a custom stamp from any images and add it to a PDF document. The following example explains how to create a custom stamp from an image in the application and add it to a PDF document using the `AddAnnotation` method of the `SfPdfViewer`. @@ -91,7 +91,7 @@ void AddCustomStampAnnotation() {% endhighlight %} {% endtabs %} -## Edit the Selected Annotation +## Edit the selected stamp You can edit the properties of the selected stamp annotation programmatically by accessing the selected annotation instance. The selected annotation instance may be obtained from the `AnnotationSelected` event. diff --git a/MAUI/PDF-Viewer/Text-Markups.md b/MAUI/PDF-Viewer/Text-Markups.md index d40d038ee7..66fb9080f5 100644 --- a/MAUI/PDF-Viewer/Text-Markups.md +++ b/MAUI/PDF-Viewer/Text-Markups.md @@ -7,11 +7,11 @@ control: SfPdfViewer documentation: ug --- -# Text Markup Annotations +# Text Markup Annotations in .NET MAUI PDF Viewer (SfPdfViewer) The text markup annotations feature of `SfPdfViewer` allows you to add, remove and modify text markups in the PDF document. This is useful for making corrections or emphasizing important texts in the document. This section will go through the various types and functions available in PDF Viewer for working with text markup annotations. -## Types of Text Markups +## Types of text markups The following text markup annotation types are now available in the PDF Viewer. @@ -25,11 +25,11 @@ The following image shows the appearance of the text markup annotation types. ![Text Markup Annotation Types.](Images/Annotations/text-markups.png) -## Adding Text Markups +## Add text markups This section will go through how to add text markup annotations to a PDF document interactively as well as programmatically to a PDF document. -### Adding Annotations using Annotation Mode +### Add text markups from annotation mode You can add text markup annotations to a PDF document by touch (or mouse down) and drag using `AnnotationMode` property of the `SfPdfViewer`. The following steps explains how to add text markup annotation on a text in a PDF. @@ -78,7 +78,7 @@ void DisableHighlightMode() {% endhighlight %} {% endtabs %} -### Adding Annotation using Text Selection +### Add text markups from text selection Text markups can be added to a PDF document using the text selection without enabling the `AnnotationMode`. Select the text you want in a PDF document, and a context menu with the text markup options will appear after you complete your selection. You can select any of the text markup options to add annotation to a text in the PDF document. @@ -120,7 +120,7 @@ void AddHighlightAnnotation() {% endhighlight %} {% endtabs %} -## Annotation Settings +## Text markup annotation settings In the text markup annotation mode, the text markups will be added with a default appearance. You can modify the annotation after it has been added to the pages. However, if you need to define the appearance before adding text markups on the document, you can change its default settings using the `AnnotationSettings` property of the `SfPdfViewer`. For that you need to obtain the default text markup annotation settings. @@ -143,7 +143,7 @@ void CustomizeDefaultHighlightSettings() {% endhighlight %} {% endtabs %} -## Edit the Selected Annotation +## Edit the selected text markup annotation You can edit the properties of the selected text markup 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 some of the properties of the selected highlight annotation. Similarly, you can modify the other text markup annotations properties. diff --git a/MAUI/PDF-Viewer/Text-Search.md b/MAUI/PDF-Viewer/Text-Search.md index e0f2269b07..33d1aaaf0a 100644 --- a/MAUI/PDF-Viewer/Text-Search.md +++ b/MAUI/PDF-Viewer/Text-Search.md @@ -18,15 +18,15 @@ The [SearchTextAsync](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfVie {% tabs %} {% highlight C# hl_lines="8" %} - private void SearchButtonClicked(object sender, EventArgs e) - { - SearchText("key"); - } +private void SearchButtonClicked(object sender, EventArgs e) +{ + SearchText("key"); +} - async void SearchText(string text) - { - await PdfViewer.SearchTextAsync(text); - } +async void SearchText(string text) +{ + await PdfViewer.SearchTextAsync(text); +} {% endhighlight %} {% endtabs %} @@ -42,13 +42,13 @@ The [TextSearchResult](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfVi {% tabs %} {% highlight C# hl_lines="5 6" %} - async void SearchText(string text) - { - TextSearchResult searchResult = await PdfViewer.SearchTextAsync(text); - // Get the total matches count and current match index. - int totalMatchesCount = searchResult.TotalMatchesCount; - int currentMatchIndex = searchResult.CurrentMatchIndex; - } +async void SearchText(string text) +{ + TextSearchResult searchResult = await PdfViewer.SearchTextAsync(text); + // Get the total matches count and current match index. + int totalMatchesCount = searchResult.TotalMatchesCount; + int currentMatchIndex = searchResult.CurrentMatchIndex; +} {% endhighlight %} {% endtabs %} @@ -65,15 +65,15 @@ The [GoToNextMatch](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewe {% tabs %} {% highlight C# %} - /// - /// Stores the search result obtained from searching the text. - /// - TextSearchResult SearchResult; +/// +/// Stores the search result obtained from searching the text. +/// +TextSearchResult SearchResult; - async void SearchText(string text) - { - SearchResult = await PdfViewer.SearchTextAsync(text); - } +async void SearchText(string text) +{ + SearchResult = await PdfViewer.SearchTextAsync(text); +} {% endhighlight %} {% endtabs %} @@ -83,17 +83,17 @@ The [GoToNextMatch](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewe {% tabs %} {% highlight C# hl_lines="4 10" %} - private void NextMatchButtonClicked(object sender, EventArgs e) - { - // Navigate to the next match. - SearchResult.GoToNextMatch(); - } +private void NextMatchButtonClicked(object sender, EventArgs e) +{ + // Navigate to the next match. + SearchResult.GoToNextMatch(); +} - private void PreviousMatchButtonClicked(object sender, EventArgs e) - { - // Navigate to the previous match. - SearchResult.GoToPreviousMatch(); - } +private void PreviousMatchButtonClicked(object sender, EventArgs e) +{ + // Navigate to the previous match. + SearchResult.GoToPreviousMatch(); +} {% endhighlight %} {% endtabs %} @@ -105,11 +105,11 @@ The [Clear](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.TextSe {% tabs %} {% highlight C# hl_lines="4" %} - private void CloseSearchButtonClicked(object sender, EventArgs e) - { - // Closes the search and clears any traces of the searched text in the PDF document. - SearchResult.Clear(); - } +private void CloseSearchButtonClicked(object sender, EventArgs e) +{ + // Closes the search and clears any traces of the searched text in the PDF document. + SearchResult.Clear(); +} {% endhighlight %} {% endtabs %} @@ -121,24 +121,24 @@ By using the `SearchTextAsync` the search result will be obtained only after all {% tabs %} {% highlight XAML hl_lines="3" %} - + {% endhighlight %} {% highlight C# hl_lines="3 9" %} - async void SearchText(string text) - { - PdfViewer.TextSearchProgress += PdfTextSearchProgress; - await PdfViewer.SearchTextAsync(text); - } - - private void PdfTextSearchProgress(object sender, TextSearchProgressEventArgs e) - { - TextSearchResult searchResult = e.SearchResult; - int totalMatchesFound = searchResult.TotalMatchesCount; - } +async void SearchText(string text) +{ + PdfViewer.TextSearchProgress += PdfTextSearchProgress; + await PdfViewer.SearchTextAsync(text); +} + +private void PdfTextSearchProgress(object sender, TextSearchProgressEventArgs e) +{ + TextSearchResult searchResult = e.SearchResult; + int totalMatchesFound = searchResult.TotalMatchesCount; +} {% endhighlight %} {% endtabs %} @@ -150,10 +150,10 @@ The [TotalPagesSearched](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Pdf {% tabs %} {% highlight C# %} - private void PdfTextSearchProgress(object sender, TextSearchProgressEventArgs e) - { - float searchCompletionPercentage = (float)e.TotalPagesSearched / (float)PdfViewer.PageCount; - } +private void PdfTextSearchProgress(object sender, TextSearchProgressEventArgs e) +{ + float searchCompletionPercentage = (float)e.TotalPagesSearched / (float)PdfViewer.PageCount; +} {% endhighlight %} {% endtabs %} @@ -170,17 +170,17 @@ The following code example shows how to cancel a currently running search. {% tabs %} {% highlight C# hl_lines="10" %} - async void SearchText(string text) - { - PdfViewer.TextSearchProgress += PdfTextSearchProgress; - await PdfViewer.SearchTextAsync(text); - } - - private void PdfTextSearchProgress(object sender, TextSearchProgressEventArgs e) - { - // Cancel the search operation when it is running but does not need to be continued. - e.SearchResult?.Clear(); - } +async void SearchText(string text) +{ + PdfViewer.TextSearchProgress += PdfTextSearchProgress; + await PdfViewer.SearchTextAsync(text); +} + +private void PdfTextSearchProgress(object sender, TextSearchProgressEventArgs e) +{ + // Cancel the search operation when it is running but does not need to be continued. + e.SearchResult?.Clear(); +} {% endhighlight %} {% endtabs %} @@ -198,12 +198,12 @@ You need to pass the `TextSearchOptions` as a parameter to the `SearchTextAsync` {% tabs %} {% highlight C# hl_lines="5" %} - async void SearchText(string text) - { - PdfViewer.TextSearchProgress += PdfTextSearchProgress; - TextSearchOptions searchOptions = TextSearchOptions.CaseSensitive; - await PdfViewer.SearchTextAsync(text, searchOptions); - } +async void SearchText(string text) +{ + PdfViewer.TextSearchProgress += PdfTextSearchProgress; + TextSearchOptions searchOptions = TextSearchOptions.CaseSensitive; + await PdfViewer.SearchTextAsync(text, searchOptions); +} {% endhighlight %} {% endtabs %} @@ -215,19 +215,19 @@ The highlight colors of the current match and other matches of a text can be cus {% tabs %} {% highlight XAML hl_lines="4 5" %} - - - - - + + + + + {% endhighlight %} {% highlight C# hl_lines="3 9" %} - PdfViewer.TextSearchSettings.CurrentMatchHighlightColor = Color.FromRgba("#8F00FF43"); - PdfViewer.TextSearchSettings.OtherMatchesHighlightColor= Color.FromRgba("#00FF0043"); +PdfViewer.TextSearchSettings.CurrentMatchHighlightColor = Color.FromRgba("#8F00FF43"); +PdfViewer.TextSearchSettings.OtherMatchesHighlightColor= Color.FromRgba("#00FF0043"); {% endhighlight %} {% endtabs %} \ No newline at end of file diff --git a/MAUI/PDF-Viewer/Text-Selection.md b/MAUI/PDF-Viewer/Text-Selection.md index 96e0310f14..178599cf57 100644 --- a/MAUI/PDF-Viewer/Text-Selection.md +++ b/MAUI/PDF-Viewer/Text-Selection.md @@ -15,18 +15,19 @@ Using [SfPdfViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewe In desktop platforms like macOS and Windows, you can select text using the mouse pointer by clicking and dragging over the text you want to select. You will notice that the selected text is highlighted when you move the pointer. +![Select text from PDF document using mouse.](Images/Text-Selection/text_selection_mouse.gif) + ## Selection using touch In mobile platforms such as Android and iOS, the long press text selection feature allows you to select text by pressing and holding the finger on the screen. Refer to the following steps for long-press text selection on a mobile device. 1. Locate the text you want to select. - 2. Place your finger on the screen and hold it against the text you wish to select. - 3. The word is highlighted and there are selection handles that appear at the start and end of the selection. - 4. You can move the selection handles to modify or extend the text selection. +![Select text from PDF document using touch.](Images/Text-Selection/text_selection.gif) + ## Copy the selected text After you have selected the desired text, click the Copy option that appears to copy it to the clipboard. The selected text is now copied to the clipboard and ready for pasting into other applications. @@ -35,7 +36,7 @@ N> In desktop platforms, you can also use the keyboard shortcut Ctrl - - - - + + + + + {% endhighlight %} {% highlight C# hl_lines="2" %} - SfPdfViewer PdfViewer = new SfPdfViewer(); - PdfViewer.TextSelectionSettings.HighlightColor = Color.FromRgba(255, 255, 0, 127); +SfPdfViewer PdfViewer = new SfPdfViewer(); +PdfViewer.TextSelectionSettings.HighlightColor = Color.FromRgba(255, 255, 0, 127); {% endhighlight %} {% endtabs %} @@ -82,38 +83,38 @@ N> The color of the selection handles also will be modified to match the text hi ## Handling selected text from application -The `TextSelectionChanged` event occurs when the text selection is completed, or when the selected text is modified in any way. This event provides the selected text and the way to prevent the display of the default context menu by handling the selected text from the application level. +The [TextSelectionChanged](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_TextSelectionChanged) event occurs when the text selection is completed, or when the selected text is modified in any way. This event provides the selected text and the way to prevent the display of the default context menu by handling the selected text from the application level. The event arguments properties that are listed below are available in the text selection changed event. -1. SelectedText - Provides the selected text. +1. [SelectedText](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.TextSelectionChangedEventArgs.html#Syncfusion_Maui_PdfViewer_TextSelectionChangedEventArgs_SelectedText) - Provides the selected text. -2. PageNumber - Provides the page number at which the text is selected. +2. [PageNumber](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.TextSelectionChangedEventArgs.html#Syncfusion_Maui_PdfViewer_TextSelectionChangedEventArgs_PageNumber) - Provides the page number at which the text is selected. -3. Handled - A boolean value indicating whether the event has been handled or processed by an event handler. By setting the `Handled` property to true, you indicate that the event is handled at the application-level event handler and no further action is necessary. So that the default copy context menu will not appear. +3. [Handled](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.TextSelectionChangedEventArgs.html#Syncfusion_Maui_PdfViewer_TextSelectionChangedEventArgs_Handled) - A boolean value indicating whether the event has been handled or processed by an event handler. By setting the `Handled` property to true, you indicate that the event is handled at the application-level event handler and no further action is necessary. So that the default copy context menu will not appear. Refer to the following code sample that explains how to wire the event to handle the selected text at the application level and prevent the default copy context menu from appearing. {% tabs %} {% highlight C# hl_lines="4 11" %} - public MainPage() - { - InitializeComponent(); - PdfViewer.TextSelectionChanged += PdfViewer_TextSelectionChanged; - } +public MainPage() +{ + InitializeComponent(); + PdfViewer.TextSelectionChanged += PdfViewer_TextSelectionChanged; +} - private void PdfViewer_TextSelectionChanged(object sender, TextSelectionChangedEventArgs e) - { - string selectedText = e.SelectedText; - int pageNumber = e.PageNumber; - // Write your logic to handle the selected text and set the ‘Handled’ to true, to prevent the default copy context menu from appearing. - e.Handled = true; - } +private void PdfViewer_TextSelectionChanged(object sender, TextSelectionChangedEventArgs e) +{ + string selectedText = e.SelectedText; + int pageNumber = e.PageNumber; + // Write your logic to handle the selected text and set the ‘Handled’ to true, to prevent the default copy context menu from appearing. + e.Handled = true; +} {% endhighlight %} {% endtabs %} ## Limitations -The text from the images cannot be selected and, the multiple-page text selection is not supported for now. \ No newline at end of file +The text from the images cannot be selected and, the multiple-page text selection is not supported for now. diff --git a/MAUI/PDF-Viewer/UI-Customization.md b/MAUI/PDF-Viewer/UI-Customization.md index dd1b5a5632..892ddbf952 100644 --- a/MAUI/PDF-Viewer/UI-Customization.md +++ b/MAUI/PDF-Viewer/UI-Customization.md @@ -34,14 +34,14 @@ You can customize the loading indicator’s properties by applying a style with {% tabs %} {% highlight xaml %} - - - - - + + + + + {% endhighlight %} {% endtabs %} diff --git a/MAUI/PDF-Viewer/Undo-Redo.md b/MAUI/PDF-Viewer/Undo-Redo.md index 2d0a0d24b4..b7a568a170 100644 --- a/MAUI/PDF-Viewer/Undo-Redo.md +++ b/MAUI/PDF-Viewer/Undo-Redo.md @@ -7,7 +7,7 @@ control: SfPdfViewer documentation: ug --- -# Undo and Redo +# Undo and Redo in .NET MAUI PDF Viewer (SfPdfViewer) If you performed any undesired actions when on adding, removing, moving, resizing or editing annotations, you can undo and redo the action to restore the previous state. This section will go through how to perform the undo and redo the changes made on the annotations. diff --git a/maui-toc.html b/maui-toc.html index f985fe7ba7..fb902d0cac 100644 --- a/maui-toc.html +++ b/maui-toc.html @@ -586,7 +586,7 @@
  • From Local Storage
  • From the URL
  • Password-Protected
  • -
  • Document Load Notifications
  • +
  • Document Load Events
  • @@ -627,6 +627,7 @@
  • Localization
  • Right to Left
  • Keyboard Shortcuts
  • +
  • Gesture Events