Search results

Close the comment panel in ASP.NET MVC PDF Viewer control

20 Jan 2022 / 1 minute to read

The PDF Viewer server library allows you to close the comment panel programmatically using the external button event.

The following steps are used to close the comment panel programmatically in PDF Viewer,

Step 1: Follow the steps provided in the link to create simple PDF Viewer sample.

Step 2: Add the following code snippet to close the comment panel using button click event

Copied to clipboard
<button type="button" onclick="closeCommentPanel()">CloseCommentPanel</button>

        function closeCommentPanel() {
            var viewer = document.getElementById('pdfviewer').ej2_instances[0];


Download the sample how to close comment panel