3

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

Community
  • 1
  • 1
Mari Selvan
  • 3,598
  • 3
  • 21
  • 36

1 Answers1

7

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;
ndnenkov
  • 35,425
  • 9
  • 72
  • 104
Marcus Li
  • 86
  • 2