Daniel Kirillov
unread,May 18, 2012, 11:37:51 AM5/18/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mozilla-d...@lists.mozilla.org
Hey,
Just wanted to clarify something. Can you pan around using PDF.js?
For instance the canvas that holds the pdf is inside a div tag that's
say 800x600 and the pdf has been zoomed in to 300% (thus not fitting
in the div), and I wish to pan to different areas of the pdf.
More specifically, there's a javascript that programmatically zooms in/
out and now I'm trying to have it also pan around.
>From the examples, when changing pages, there's a call to getViewport.
var viewport = page.getViewport(zoomLevel);
That got me thinking if it is possible to use that viewport to pan
around since the viewport has offsetCanvasX, offsetCanvasY.
Thanks in advance.