Cant Open multiple instances of ngx-extended-pdf-viewer

960 Views Asked by At

I am facing issues while using ngx-extended-pdf-viewer.I am displaying a pdf using this component. And at the same time I want to display another pdf in a pop using ngx-extended-pdf-viewer.

The first pdf shows up fine but when I want to view another pdf in a pop up ,the pop up shows a blank screen and the pdf is viewed in the background that is it replaces the first pdf.

I want to view the two pdf's at the same time and the second pdf should view in the pop up.

How can I resolve this?

1

There are 1 best solutions below

0
On

Short answer: that's not possible. The base library, pdf.js, pollutes the global name space, so there's only one instance of the PDF viewer at max.

But: I believe you can wrap ngx-extended-pdf-viewer in a web component. I haven't found the time to test this, but that should solve the problem.