Disable context menu option in ##Platform_Name## Pdfviewer control

18 Nov 20181 minute to read

To disable the context menu in the Syncfusion PDF viewer control, you can use the ContextMenuOption property as 'None' to hide all context menu options. Default value of the ContextMenuOption is 'RightClick'.

Here is an example of how you can use the ContextMenuOption to disable context menu in the PDF Viewer:


<button id='disable'>Disable ContextMenuOption</button>

// Disable ContextMenuOption
document.getElementById('disable').addEventListener('click', ()=> {
  viewer.contextMenuOption = 'None';
});

This will hide the context menu and prevent the user from right-clicking on the PDF viewer.

Find the sample how to disable context menu