jquery - Jump to page in PDF.js with javascript -


i'm trying use pdf.js' viewer display pdf files on page.

i've gotten working, able 'jump to' specific page in pdf. know can set page url, in javascript if it's possible.

i have noticed there pdfjs object in global scope, , seems should able access things page setting there, it's rather massive object. know how this?

you can set page via javascript with:

var desiredpage = [the page want]; pdfviewerapplication.page = desiredpage; 

there event handler on this, , ui adjusted accordingly. may want ensure not out of bounds:

function gotopage(desiredpage){     var numpages = pdfviewerapplication.pagescount;     if((desiredpage > numpages) || (desiredpage < 1)){         return;     }     pdfviewerapplication.page = desiredpage; } 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -