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

PDF.js PDFPageView.update() - pdf files with a maximum of 5 pages

419 views
Skip to first unread message

Daniel Forero

unread,
Nov 11, 2015, 12:07:26 PM11/11/15
to mozilla-d...@lists.mozilla.org
Hi,

I have a webapp that is mostly used in mobile devices. As a requirement i need to support as many devices as possible. The pdf files have a maximum of 5 pages (without attachments, annotations, forms, and any other special feature, just text and images). I have embedded and modified the view just with the following options: zoom In, zoom out, and current page indicator.

In desktop the web app works as it should, but in mobile, when i scroll around the page from top to bottom and vice versa, and i do it too fast, the browser freezes. I notice that PDFPageView.update(...) gets called multiple times. I would like to update the view only when a resize event is fired.

Is there a reason to update the view when other event besides resize is fired?

Taking into account, that the pdf file used does not have special features, is there any way to disable this behaviour and only update the view when is needed?

Any advice to use pdf.js into a web app?

Thanks in advance



0 new messages