{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "pdf-viewer-annotations",
  "framework": "aspnet-mvc",
  "type": "registry:component",
  "component": "PdfViewer",
  "variant": "annotations",
  "dependencies": [
    "Syncfusion.AspNetMvc.PdfViewer"
  ],
  "description": "PDF viewer pre-populated with highlight and underline annotations on page one.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/aspnet-mvc/llms.txt",
    "skillPack": "syncfusion/aspnetmvc-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/aspnet-mvc/pdf-viewer-annotations.md"
  },
  "files": [
    {
      "target": "src/components/pdf-viewer-annotations/PdfViewer.cshtml",
      "content": "@using Syncfusion.EJ2\n@{\n    ViewData[\"Title\"] = \"Annotations\";\n    Layout = \"~/Views/Shared/_Layout.cshtml\";\n}\n@{\n    string serviceUrl = VirtualPathUtility.ToAbsolute(\"~/api/PdfViewer/\");\n}\n\n@section ControlsSection{\n    <div class=\"control-section\">\n         @Html.EJS().PdfViewer(\"pdfviewer\").DocumentPath(\"https://cdn.syncfusion.com/content/pdf/annotations-v2.pdf\").ResourceUrl(\"https://cdn.syncfusion.com/ej2/35.1.37/dist/ej2-pdfviewer-lib\").DocumentLoad(\"documentLoad\").DownloadEnd(\"documentLoad\").IsCommandPanelOpen(true).IsAnnotationToolbarVisible(true).Render()\n    </div>\n}\n@*custom code start*@\n<style>\n\n#pdfviewer {\n    display: block;\n    height: 641px;\n}\n\n</style>\n@*custom code end*@\n<script>\n\n    function documentLoad(arg) {\n        var viewer = document.getElementById('pdfviewer').ej2_instances[0];\n        if (arg.documentName === 'annotations-v2.pdf') {\n            viewer.annotation.addAnnotation(\"Highlight\", {\n                bounds: [{ x: 97, y: 610, width: 340, height: 14 }],\n                pageNumber: 1\n            });\n            viewer.annotation.addAnnotation(\"Underline\", {\n                bounds: [{ x: 97, y: 705, width: 346, height: 14 }],\n                pageNumber: 1\n            });\n            viewer.annotation.addAnnotation(\"Strikethrough\", {\n                bounds: [{ x: 97, y: 800, width: 367, height: 14 }],\n                pageNumber: 1\n            });\n            viewer.annotation.addAnnotation(\"Squiggly\", {\n                bounds: [{ x: 97, y: 895.5, width: 336, height: 14 }],\n                pageNumber: 1\n            });\n        \n        }\n    }\n    function change(args) {\n        var viewer = document.getElementById('pdfviewer').ej2_instances[0];\n        if (args.checked) {\n            viewer.serviceUrl = '';\n        } else {\n            viewer.serviceUrl = '@serviceUrl';\n        }\n        viewer.dataBind();\n        viewer.load(viewer.documentPath, null);\n    }\n\n</script>\n"
    },
    {
      "target": "src/components/pdf-viewer-annotations/PdfViewerController.cs",
      "content": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Web.Mvc;\n\nnamespace EJ2MVCSampleBrowser.Controllers.PdfViewer\n{\n    public partial class PdfViewerController : Controller\n    {\n        public ActionResult Annotations()\n        {\n            return View(\"~/Views/Home/pdf-viewer/annotations/PdfViewer.cshtml\");\n        }\n    }\n}"
    }
  ]
}