diff --git a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/show-hide-annotation.md b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/show-hide-annotation.md new file mode 100644 index 0000000000..f75002b5f6 --- /dev/null +++ b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/how-to/show-hide-annotation.md @@ -0,0 +1,74 @@ +--- +layout: post +title: Show and Hide Annotations in EJ2 ASP.NET MVC PdfViewer | Syncfusion +description: Learn how to dynamically show and hide annotations in the Syncfusion ASP.NET MVC PDF Viewer component of Syncfusion Essential JS 2 and more. +platform: ej2-asp-core-mvc +control: Show and Hide Annotations +publishingplatform: ##Platform_Name## +documentation: ug +--- + +# Show and Hide Annotations in PDF Viewer + +### Overview + +This guide demonstrates how to implement functionality to dynamically show and hide annotations in a PDF document loaded in the Syncfusion PDF Viewer using ASP.NET MVC. This feature is particularly useful in scenarios where you need to present a clean view of the document or toggle between annotated and non-annotated views. + +### How to Show and Hide Annotations + +**Step 1:** Set Up the PdfViewer in Your ASP.NET MVC Project + +First, follow the steps provided in the [getting started guide](https://ej2.syncfusion.com/aspnetmvc/documentation/pdfviewer/getting-started) to create a simple PDF Viewer sample. + +**Step 2:** Add Toggle Button and Implementation + +Add a button to toggle annotation visibility and implement the necessary JavaScript functions to handle the show/hide functionality: + +{% tabs %} +{% highlight html tabtitle="Standalone" %} + +@using Syncfusion.EJ2 +@{ + ViewBag.Title = "Home Page"; +} +
+
+ + +
+
+ @Html.EJS().PdfViewer("pdfviewer").DocumentPath("https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf").ResourceUrl("https://cdn.syncfusion.com/ej2/30.1.37/dist/ej2-pdfviewer-lib").Render() +
+
+ + + +{% endhighlight %} +{% endtabs %} + +This implementation provides a clean, efficient way to toggle the visibility of annotations in your PDF documents. It's particularly useful for presentation scenarios or when you need to focus on the document content without the distraction of annotations. + +[View sample in GitHub](https://github.com/SyncfusionExamples/mvc-pdf-viewer-examples/tree/master/How%20to) \ No newline at end of file diff --git a/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/show-hide-annotation.md b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/show-hide-annotation.md new file mode 100644 index 0000000000..71acf70da3 --- /dev/null +++ b/ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/how-to/show-hide-annotation.md @@ -0,0 +1,67 @@ +--- +layout: post +title: Show and Hide Annotations in EJ2 ASP.NET CORE PdfViewer | Syncfusion +description: Learn how to show and hide annotations in the Syncfusion ASP.NET CORE PDF Viewer component of Syncfusion Essential JS 2 and more. +platform: ej2-asp-core-mvc +control: PDF Viewer +publishingplatform: ##Platform_Name## +documentation: ug +--- + +# Show and Hide Annotations in PDF Viewer + +### Overview + +This guide demonstrates how to dynamically show and hide annotations in the Syncfusion PDF Viewer component in an ASP.NET Core application. This functionality is useful when you want to provide users with the ability to toggle the visibility of annotations within PDF documents. + +### How to Show and Hide Annotations + +**Step 1:** Set up the PDF Viewer in your ASP.NET Core project + +First, create a basic PDF Viewer implementation in your ASP.NET Core application. + +**Step 2:** Add a toggle button and implement the show/hide functionality + +Add a button that allows users to toggle the visibility of annotations within the PDF document. + +{% tabs %} +{% highlight cshtml tabtitle="Standalone" %} + +@page "{handler?}" +@using ShowHideAnnotations.Pages +@model IndexModel +@{ +ViewData["Title"] = "Home page"; +} +
+ + + + +
+ + +{% endhighlight %} +{% endtabs %} + +This implementation provides a clean, efficient way to toggle the visibility of annotations in your PDF documents. It's particularly useful for presentation scenarios or when you need to focus on the document content without the distraction of annotations. + +[View sample in GitHub](https://github.com/SyncfusionExamples/asp-core-pdf-viewer-examples/tree/master/How%20to/ShowHideAnnotations) \ No newline at end of file diff --git a/ej2-asp-core-toc.html b/ej2-asp-core-toc.html index 788fae1adb..78c7999ea4 100644 --- a/ej2-asp-core-toc.html +++ b/ej2-asp-core-toc.html @@ -2027,6 +2027,7 @@
  • Find Text using findTextAsync
  • Extract Text Completed
  • Dynamically Enable or Disable Text Selection
  • +
  • Show and Hide Annotations
  • Troubleshooting diff --git a/ej2-asp-mvc-toc.html b/ej2-asp-mvc-toc.html index cd66da33b3..0a261e37a6 100644 --- a/ej2-asp-mvc-toc.html +++ b/ej2-asp-mvc-toc.html @@ -1987,6 +1987,7 @@
  • Find Text using findTextAsync
  • Extract Text Completed
  • Dynamically Enable or Disable Text Selection
  • +
  • Show and Hide Annotation
  • Troubleshooting