The PDF Viewer library allows you to disable context menu action using the contextMenuAction property as 'None'
. Default value of the contextMenuAction is 'RightClick'
.
Step 1: Follow the steps provided in the link to create simple PDF Viewer sample.
Step 2: Add the following code snippet to disable context menu action for PDF viewer control.
<button id='disable'>Disable ContextMenu</button>
// Disable contextMenu action
document.getElementById('disable').addEventListener('click', ()=> {
viewer.contextMenuOption = 'None';
});
Find the Sample how to disable Context Menu action