WebViewer – How to set Read-Only mode by default?

Hi everyone,

WebViewer by default starts in edit mode. Does anyone know how to set it to read-only mode by default?

I understand that I can setReadOnly()/enableReadOnlyMode() later after initializing WebViewerInstance; however, there’s a short period of time which WebViewer is in edit mode. If I can set read-only mode at the time of initialization, that’d be ideal!

Thanks in advance!


We can use the documentLoaded event to achieve this:

documentViewer.addEventListener('documentLoaded', () => {

More information on the WebViewer lifecycle here: Loading-events | Apryse Documentation