Get and set tool

Product: Webviewer

Product Version: 10.1.1

Hi,

We need to retrieve the last tool used when closing the webviewer in order to re-apply it when reopening. What solution would you suggest to us to achieve this?

Thanks a lot!

Cathy Côté

1 Like

Thank you for posting your question to our forum. We will provide you with an update as soon as possible.

2 Likes

Hi there,

You can get current tool mode via getToolMode:
https://docs.apryse.com/api/web/Core.DocumentViewer.html#getToolMode__anchor

If you can capture this when a user closes WebViewer, you can set the tool mode on documentLoad like this:

documentViewer.addEventListener('documentLoaded', () => {
      documentViewer.setToolMode(tool)
})

Best regards,
Kevin Kim

1 Like