Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example to use multiple PDF.js viewer in same page #7693

Closed
himani-chaudhary opened this issue Oct 5, 2016 · 3 comments
Closed

Example to use multiple PDF.js viewer in same page #7693

himani-chaudhary opened this issue Oct 5, 2016 · 3 comments

Comments

@himani-chaudhary
Copy link

Hi Team,

I am facing an issue to add multiple PDF.js viewers in single page. First of all, I don't know how to start, as in the example page i.e.
https://mozilla.github.io/pdf.js/web/viewer.html

Here, the whole structure uses IDs, i.e. outerContainer, mainContainer, viewerContainer, viewer.

How to add similar structure to show other PDF in the same page. Please provide any example page, which I can refer.

Thanks

@yurydelendik
Copy link
Contributor

Demo viewer is not designed to be used/instantiated multiple times on the same page. However we performed multiple steps toward making it work in such manner (e.g. #7209 or #6571).

I am facing an issue to add multiple PDF.js viewers in single page.

Hosting multiple iframes gives the same effect, so there is no real benefits for the project to have and support such functionality. Closing as won't fix for now.

@gaupoit
Copy link

gaupoit commented Apr 9, 2020

Dear team,

Thanks for creating the wonderful library. We are also facing these problems, have we supported this feature now?

@timvandermeij
Copy link
Contributor

Improvements have been made to make the viewer much more stand-alone and less dependent on global attributes. However, the iFrame approach is still the recommended way for now, but we're always open for contributions to improve the situation. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants