webodf / ViewerJS

ViewerJS: Document Reader in JavaScript
http://viewerjs.org
1.94k stars 421 forks source link

Open at a specific page #244

Open svoddi514 opened 6 years ago

svoddi514 commented 6 years ago

This is not an issue but a question. Is it possible to open pdf at a specific page? How can it be achieved using ViewerJS? Thanks

cracker0dks commented 6 years ago

My workaround (with jquery) is to change the page Number field (on document ready) and than dispatch a change event...

$("#pageNumber").val(3); //Change to slide 2 (counting from 0)
var event = new Event('change');
$("#pageNumber")[0].dispatchEvent(event);
Evy77 commented 5 years ago

This is how we do it http://www.xxx.xx/ViewerJS/?startpage=29#.."/the location where the pdf is stored"