Reputation: 3802
I want to get the current page number from pdf.js when user
Click's some Button.I'm not opening pdf file in iframe like that
Below link
I'm using the pdf.js Directly From the GitHub Project
My Question is how can I get the Current page Number from
pdf.js
Upvotes: 3
Views: 14423
Reputation: 86
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;
Upvotes: 7