With pdf.js is there a way to programmatically change the current page of a PDF being viewed? For example, a call to change the current page to page 5.
(I know that I can initially set the page by specifying the page number in the URL, but I want to change it programmatically after it has been opened.)
PDFViewerApplication.pdfViewer.currentPageNumber
is a getter and setter. Examples:
// Go to page 5
PDFViewerApplication.pdfViewer.currentPageNumber = 5;
// Move two pages forward
PDFViewerApplication.pdfViewer.currentPageNumber += 2;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With