8.9 side by side not working completely

WebViewer Version: 8.9

Do you have an issue with a specific file(s)?
Can you reproduce using one of our samples or online demos?
Are you using the WebViewer server?
Does the issue only happen on certain browsers?
Is your issue related to a front-end framework?
Is your issue related to annotations?

Please give a brief summary of your issue:

8.9 side by side doesnt work completely. The getDocumentViewers() method used in the guide doesnt work at all :
main.js:1 ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading ‘getDocumentViewers’)
TypeError: Cannot read properties of undefined (reading ‘getDocumentViewers’)

The guide mentions methods that are not implemented / available.PDFTron Systems Inc. | Documentation

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:


Any info about this?

Hi @MichaelL,

Thanks for reaching out! Can you share a sample of your code that is throwing this error? I’m not able to reproduce this error in our WebViewer Demo or using WebViewer Server.


I’m just trying to use the getDocumentViewers() method in our application, as shown in the guide PDFTron Systems Inc. | Documentation

Relevant code in our application :

            const [documentViewer1, documentViewer2] = Core.getDocumentViewers();

it throws a typescript error on compiling because the method doesnt exist in type.d.ts

When using ts-ignore, in case the type.d.ts file was not updated

// @ts-ignore
const [documentViewer1, documentViewer2] = Core.getDocumentViewers();

we have an error when the method is fired in the browser.

main.js:1 ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading ‘getDocumentViewers’)

I don’t know what you mean by reproducing with the webviewer server demo or server. I checked the 8.9 sample code and nowhere is this method used in the samples.

Addendum :
the getDocumentViewers mentionned in the guide doesnt even exist in the API that is being referenced in the same guide


Hi @MichaelL,

I appreciate your patience and thanks for bringing it to our attention. I’ve informed the team and will work on getting the documentation updated to fix the Typescript error.

Let me know if you have any other questions.


Thanks Adam

In the meantime, using @ts-ignore does the trick.

Hi @MichaelL,

The documentation should be updated now in our latest nightly stable build for 8.9. You can find it
in our nightly stable installation page, or install via npm.

Let me know if you still have issues.