Strange auto-disabling of webviewer server on Angular

Hi,
We are having some troubles using Pdftron’s Webviewer Server (everything works fine client-side). The first time that we preview the document, everything works fine, the value of the index “WebViewer Server” in the console is “true” (see screenshot). However, when we try a second time to preview the same document in the same conditions, the preview does not work, and the console shows that the index “WebViewer Server” is “false” (see same screenshot). We are providing exactly the same htmlElement and options to the WebViewer function each time.
Can you help us understand why the WebViewer Server is disabled suddenly and how can we fix this problem?
Thanks!

It looks quite weird. Could you double check the options you pass into the WebViewer? Thanks.

Hello,
The options we pass into the WebViewer are exactly the same both times (please see screenshot below).


Thanks,

Hi,

May i confirm that the screenshot you sent in the last reply is from the failing case? Thanks.

Wanbo

Hi,
These are the options we provide every time to the WebViewer, the first time it works, the second time it fails.
Thanks,

Hi Wanbo,
Do you have any idea with this set of options may lead to different behaviors ?
Thanks,
Alicia

Hi Alicia,

I have no idea honestly, it’s my first time seeing this behaviour. Could you check the compare the logs/errors/warnings in the console. I saw there’s something in the console, maybe you can help check. Thanks.

Wanbo