The WebViewer does not retain the expansion of the Outlines Panel when closing → re-opening the Left Panel.
Note: It works well in Apryse WebViewer 8.7.0.
Please refer to steps below: Pre-conditions:
A PDF file that has the bookmark structure with 3 levels like below:
–bm-grand
-----bm-parent
---------bm-child
Steps:
Open the PDF file with Apryse WebViewer.
Click on the Left Panel button to open the Left Panel.
Select the Outlines Panel.
Manually expand bm-grand then expand bm-parent.
Now all bookmarks are expanded.
Click on the Left Panel button to close the Left Panel.
Click on the Left Panel button to re-open the Left Panel. Expected: The expansion of bookmarks is retained. Actual: All bookmarks are collapsed.
I see that when closing the Left Panel, the DOM elements are destroyed, then when re-opening, it has to re-render the Outlines Panel and lose the expansion state.
Can anyone confirm for me that is a change to save performance or just an accident?
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems you’re experiencing an issue with the Outlines Panel in the WebViewer where the expansion state of bookmarks is not retained after closing and reopening the Left Panel. This behavior can indeed be related to how the DOM elements are managed to optimize performance, specifically by destroying and re-rendering components when not in use.
Some things you can try:
Consider implementing a custom solution to save the expansion state before the Left Panel is closed and restore it when it is reopened.
Use event listeners to track the expansion state of bookmarks and save this state in a variable or a storage solution, such as localStorage or sessionStorage.
Check if there are any updates or patches in newer versions of WebViewer that address this issue.
Yes, it is currently the expected behavior where the outlines auto-collapses when switching between panels. If you would like to expand all outlines instead, you can set autoExpandOutlines to true. For example: