docViewer.setCurrentPage() jumps back to first page

Product: WebViewer

Product Version: 7.3.3

Please give a brief summary of your issue:
When I try to use docViewer.setCurrentPage() in the callback for docViewer.on(‘documentLoaded’), I can see the page I want briefly display and then the Webviewer immediately jumps back to first page.

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Please provide a link to a minimal sample where the issue is reproducible:

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:



I’m wondering if you can try out this solution:

Please let me know if it does not resolve your issue.

Anthony Chen

That does appear to work!

I had seen the referenced thread but I couldn’t quite follow what the code was doing and I wasn’t exactly sure it was related to my problem.

Could you explain what the code does exactly and how it fixes the issue? Could it cause issues with any other part of the WebViewer?

Thank you.


I have asked the developer to update the referenced guide to provide more details.

I will do my best to explain given the information that I know:

Some documents have open action in XFDF. These open action do different things. Here is one of the case.

We load the annotation’s XFDF in parallel with loading the document, hence why you are seeing this issue. This is not ideal and it is on our roadmap to fix in the future.

For the code provided:
If there is a “go to action on document open”, don’t do it.

The effect is that if there are other “go to actions”, then it won’t work anymore.

For your case described here: the code provided will not affect you.

Hope that help clear things up.

Anthony Chen

That does clear it up. Thank you.