Can you reproduce using one of our samples or online demos?
Yes
Are you using the WebViewer server?
No
Does the issue only happen on certain browsers?
No; General issue
Is your issue related to a front-end framework?
Yes
Is your issue related to annotations?
Yes; Tool mode changes/resets back to (unknown) default.
Please give a brief summary of your issue:
Whenever we reuse the already initialized web-viewer instance and let the user load a new document all previously set settings get resetted.
Opened panels, page transition, page layout selected annotation tool gets resetted.
I did not find any possibility to disable this behaviour and/or overwritet it to my defaults.
Please describe your issue and provide steps to reproduce it:
Unfortunately, we currently don’t have an API to avoid resetting the page settings after loading new document. You would need to achieve this by customizing the Webviewer UI.
The Webviewer UI is an open-source project that could be accessed at GitHub - PDFTron/webviewer-ui: WebViewer UI built in React.
You could prevent the resetting by changing the code in the onDocumentUnloaded event: webviewer-ui/onDocumentUnloaded.js at 8.7 · PDFTron/webviewer-ui · GitHub. By removing the leftPanel from the array inside actions.closeElements, this should prevent the left panel from closing after you load a new document.Similar configurations could be applied to the elements that you would like to keep after loading a new document.