Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multiple PDF documents on the same web page

127 views
Skip to first unread message

Will Abson

unread,
Mar 12, 2013, 10:07:02 AM3/12/13
to
Hi,

I am using PDFJS.getDocument() directly to display a PDF on-screen within my web application [1].

I have my own class which is responsible for calling getDocument(), and then rendering the canvas and and text layer via a class method supplied as a callback.

With a single instance of the class, it works well. The problem I am having is that I now wish to render more than one PDF document into the page using multiple instances of my class, and this causes some PDFs to display incorrectly.

It appears that the first PDF to load displays fine, but subsequent PDFs are rendered with content from the previous PDFs combined on top of or underneath their own content, inside each page.

My app is fairly complex, so I'll avoid posting the source here. Instead I'm minded to put together a simple HTML page to attempt to reproduce the issue, but before I go to the effort of doing that I would be interested to know if such a use case is even supported, or if there are any gotchas that I should bear in mind when displaying multiple PDFs.

Thanks,
Will

[1] https://github.com/share-extras/media-viewers
0 new messages