Mari Selvan
Mari Selvan

Reputation: 3802

pdf.js : How can we get the current pdf page number using pdf.js

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

using iframe

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

Answers (1)

Marcus Li
Marcus Li

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

Related Questions