diff --git a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/annotation/text-markup-annotation.md b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/annotation/text-markup-annotation.md index c79d8efba1..2e82adee5b 100644 --- a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/annotation/text-markup-annotation.md +++ b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/annotation/text-markup-annotation.md @@ -10,7 +10,7 @@ documentation: ug # Text Markup Annotation in the ASP.NET MVC PDF Viewer component -The PDF Viewer control provides the options to add, edit, and delete text markup annotations such as highlight, underline, and strikethrough annotations in the PDF document. +The PDF Viewer control provides the options to add, edit, and delete text markup annotations such as highlight, underline, strikethrough and squiggly annotations in the PDF document. ![Alt text](../images/text_markup_annotation.png) @@ -461,6 +461,157 @@ Here's an example of how you can use the **addAnnotation()** method to apply Str {% endhighlight %} {% endtabs %} +## Squiggly a text + +There are two ways to add a squiggly annotation to text in the PDF document: + +1. Using the context menu + * Select a text in the PDF document and right-click it. + * Select the **Squiggly** option in the context menu that appears. + +![Alt text](../images/squiggly_context.png) + + +2. Using the annotation toolbar + * Click the **Edit Annotation** button in the PDF Viewer toolbar. A toolbar appears below it. + * Select the **Squiggly** button in the annotation toolbar. It enables the squiggly mode. + * Select the text and the squiggly annotation will be added. + * You can also select the text and apply the squiggly annotation using the **Squiggly** button. + +![Alt text](../images/squiggly_button.png) + +In the pan mode, if the squiggly mode is entered, the PDF Viewer control will switch to text select mode to enable the text selection for adding squiggly to the text. + +Refer to the following code sample to switch to the squiggly mode. + +{% tabs %} +{% highlight html tabtitle="Standalone" %} + + + + +
+ @Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render() +
+ + +{% endhighlight %} +{% highlight html tabtitle="Server-Backed" %} + + + + +
+ @Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render() +
+ + +{% endhighlight %} +{% endtabs %} + +Refer to the following code sample to switch back to normal mode from the squiggly mode. + +{% tabs %} +{% highlight html tabtitle="Standalone" %} + + + + + +
+ @Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render() +
+ + +{% endhighlight %} +{% highlight html tabtitle="Server-Backed" %} + + + + + +
+ @Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render() +
+ + +{% endhighlight %} +{% endtabs %} + +## Squiggly a text programmatically + +The PDF Viewer library enables you to programmatically Squiggly text within the PDF Viewer control using the **addAnnotation()** method. + +Here's an example of how you can use the **addAnnotation()** method to apply Squiggly programmatically: + +{% tabs %} +{% highlight cshtml tabtitle="Standalone" %} + + +
+ @Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render() +
+ + +{% endhighlight %} +{% highlight cshtml tabtitle="Server-Backed" %} + + +
+ @Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").Render() +
+ + +{% endhighlight %} +{% endtabs %} + + ## Deleting a text markup annotation The selected annotation can be deleted in the following ways: @@ -493,7 +644,7 @@ The opacity of the annotation can be edited using the range slider provided in t ## Setting default properties during the control initialization -The properties of the text markup annotation can be set before creating the control using the highlightSettings, underlineSettings, and strikethroughSettings. +The properties of the text markup annotation can be set before creating the control using the highlightSettings, underlineSettings, strikethroughSettings and squigglySettings. N>After editing the default color and opacity using the Edit Color tool and Edit Opacity tool, they will be changed to the selected values. @@ -503,14 +654,14 @@ Refer to the following code sample to set the default annotation settings. {% highlight html tabtitle="Standalone" %}
- @Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").HighlightSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerHighlightSettings{Author = "Guest User", Color = "#ffff00", Opacity = 0.9 }).UnderlineSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerUnderlineSettings{ Author = "Guest User", Color = "#00ffff", Opacity = 0.9 }).StrikethroughSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerStrikethroughSettings{ Author = "Guest User", Color = "#ff00ff", Opacity = 0.9, }).Render() + @Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").HighlightSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerHighlightSettings{Author = "Guest User", Color = "#ffff00", Opacity = 0.9 }).UnderlineSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerUnderlineSettings{ Author = "Guest User", Color = "#00ffff", Opacity = 0.9 }).StrikethroughSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerStrikethroughSettings{ Author = "Guest User", Color = "#ff00ff", Opacity = 0.9, }).SquigglySettings(new Syncfusion.EJ2.PdfViewer.PdfViewerSquigglySettings{ Author = "Guest User", Color = "#0000ff", Opacity = 0.9 }).Render()
{% endhighlight %} {% highlight html tabtitle="Server-Backed" %}
- @Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").HighlightSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerHighlightSettings{Author = "Guest User", Color = "#ffff00", Opacity = 0.9 }).UnderlineSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerUnderlineSettings{ Author = "Guest User", Color = "#00ffff", Opacity = 0.9 }).StrikethroughSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerStrikethroughSettings{ Author = "Guest User", Color = "#ff00ff", Opacity = 0.9, }).Render() + @Html.EJS().PdfViewer("pdfviewer").ServiceUrl(VirtualPathUtility.ToAbsolute("~/PdfViewer/")).DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").HighlightSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerHighlightSettings{Author = "Guest User", Color = "#ffff00", Opacity = 0.9 }).UnderlineSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerUnderlineSettings{ Author = "Guest User", Color = "#00ffff", Opacity = 0.9 }).StrikethroughSettings(new Syncfusion.EJ2.PdfViewer.PdfViewerStrikethroughSettings{ Author = "Guest User", Color = "#ff00ff", Opacity = 0.9, }).SquigglySettings(new Syncfusion.EJ2.PdfViewer.PdfViewerSquigglySettings{ Author = "Guest User", Color = "#0000ff", Opacity = 0.9 })Render()
{% endhighlight %} diff --git a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/annotation/text-markup-annotation.md b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/annotation/text-markup-annotation.md index 451a76fd9d..812932918d 100644 --- a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/annotation/text-markup-annotation.md +++ b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/annotation/text-markup-annotation.md @@ -10,7 +10,7 @@ documentation: ug # Text Markup Annotation in the ASP.NET Core PDF Viewer Control -The PDF Viewer control provides the options to add, edit, and delete text markup annotations such as highlight, underline, and strikethrough annotations in the PDF document. +The PDF Viewer control provides the options to add, edit, and delete text markup annotations such as highlight, underline, strikethrough and squiggly annotations in the PDF document. ![Alt text](../../pdfviewer/images/text_markup_annotation.png) @@ -527,6 +527,177 @@ Here's an example of how you can use the **addAnnotation()** method to apply Str {% endhighlight %} {% endtabs %} +## Squiggly a text + +There are two ways to add a squiggly annotation to text in the PDF document: + +1.Using the context menu + +* Select a text in the PDF document and right-click it. +* Select the **Squiggly** option in the context menu that appears. + +![Alt text](../../pdfviewer/images/squiggly_context.png) + + +2.Using the annotation toolbar + +* Click the **Edit Annotation** button in the PDF Viewer toolbar. A toolbar appears below it. +* Select the **Squiggly** button in the annotation toolbar. It enables the squiggly mode. +* Select the text and the squiggly annotation will be added. +* You can also select the text and apply the squiggly annotation using the **Squiggly** button. + +![Alt text](../../pdfviewer/images/squiggly_button.png) + +In the pan mode, if the squiggly mode is entered, the PDF Viewer control will switch to text select mode to enable the text selection for adding squiggly to the text. + +Refer to the following code sample to switch to the squiggly mode. + +{% tabs %} +{% highlight cshtml tabtitle="Standalone" %} + + + +
+ + +
+ + +{% endhighlight %} +{% highlight cshtml tabtitle="Server-Backed" %} + + + +
+ + +
+ + +{% endhighlight %} +{% endtabs %} + +Refer to the following code sample to switch back to normal mode from the squiggly mode. + +{% tabs %} +{% highlight cshtml tabtitle="Standalone" %} + + + + + +
+ + +
+ + +{% endhighlight %} +{% highlight cshtml tabtitle="Server-Backed" %} + + + + + +
+ + +
+ + +{% endhighlight %} +{% endtabs %} + +## Squiggly a text programmatically + +The PDF Viewer library enables you to programmatically Squiggly text within the PDF Viewer control using the **addAnnotation()** method. + +Here's an example of how you can use the **addAnnotation()** method to apply Squiggly programmatically: + +{% tabs %} +{% highlight cshtml tabtitle="Standalone" %} + + +
+ + +
+ + +{% endhighlight %} +{% highlight cshtml tabtitle="Server-Backed" %} + + +
+ + +
+ + +{% endhighlight %} +{% endtabs %} + ## Deleting a text markup annotation The selected annotation can be deleted in the following ways: @@ -559,7 +730,7 @@ The opacity of the annotation can be edited using the range slider provided in t ## Setting default properties during the control initialization -The properties of the text markup annotation can be set before creating the control using the highlightSettings, underlineSettings, and strikethroughSettings. +The properties of the text markup annotation can be set before creating the control using the highlightSettings, underlineSettings, strikethroughSettings and squiggly. N>After editing the default color and opacity using the Edit Color tool and Edit Opacity tool, they will be changed to the selected values. @@ -577,7 +748,9 @@ Refer to the following code sample to set the default annotation settings. underlineSettings="@(new Syncfusion.EJ2.PdfViewer.PdfViewerUnderlineSettings {Author="Guest User", Color="#00ffff", Opacity=0.9})" strikethroughSettings="@(new Syncfusion.EJ2.PdfViewer.PdfViewerStrikethroughSettings - {Author="Guest User", Color="#ff00ff", Opacity=0.9})"> + {Author="Guest User", Color="#ff00ff", Opacity=0.9})" + squigglySettings="@(new Syncfusion.EJ2.PdfViewer.PdfViewerSquigglySettings + {Author="Guest User", Color="#00ff00", Opacity=0.9})"> @@ -594,7 +767,10 @@ Refer to the following code sample to set the default annotation settings. underlineSettings="@(new Syncfusion.EJ2.PdfViewer.PdfViewerUnderlineSettings {Author="Guest User", Color="#00ffff", Opacity=0.9})" strikethroughSettings="@(new Syncfusion.EJ2.PdfViewer.PdfViewerStrikethroughSettings - {Author="Guest User", Color="#ff00ff", Opacity=0.9})"> + {Author="Guest User", Color="#ff00ff", Opacity=0.9})" + squigglySettings="@(new Syncfusion.EJ2.PdfViewer. + PdfViewerSquigglySettings + {Author="Guest User", Color="#00ff00", Opacity=0.9})"> diff --git a/ej2-asp-core-mvc/pdfviewer/images/squiggly_button.png b/ej2-asp-core-mvc/pdfviewer/images/squiggly_button.png new file mode 100644 index 0000000000..86418c5b1a Binary files /dev/null and b/ej2-asp-core-mvc/pdfviewer/images/squiggly_button.png differ diff --git a/ej2-asp-core-mvc/pdfviewer/images/squiggly_context.png b/ej2-asp-core-mvc/pdfviewer/images/squiggly_context.png new file mode 100644 index 0000000000..97377da1d1 Binary files /dev/null and b/ej2-asp-core-mvc/pdfviewer/images/squiggly_context.png differ diff --git a/ej2-asp-core-mvc/pdfviewer/images/text_markup_annotation.png b/ej2-asp-core-mvc/pdfviewer/images/text_markup_annotation.png index cce63eaa50..a0684a6282 100644 Binary files a/ej2-asp-core-mvc/pdfviewer/images/text_markup_annotation.png and b/ej2-asp-core-mvc/pdfviewer/images/text_markup_annotation.png differ