Disable context menu in ASP.NET Core PDF Viewer control

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:

<div style="width:100%;height:600px">
    <ejs-pdfviewer id="pdfviewer"
                   style="height:600px"
                   documentPath="https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf"
                   resourceUrl="https://cdn.syncfusion.com/ej2/31.1.17/dist/ej2-pdfviewer-lib"
                   contextMenuOption="None">
    </ejs-pdfviewer>
</div>
<div style="width:100%;height:600px">
    <ejs-pdfviewer id="pdfviewer"
                   style="height:600px"
                   documentPath="https://cdn.syncfusion.com/content/pdf/form-filling-document.pdf"
                   serviceUrl="/api/PdfViewer"
                   contextMenuOption="None">
    </ejs-pdfviewer>
</div>

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