pdf.js :我们如何使用 pdf.js 获取当前的 pdf 页码

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

我想在用户

时从pdf.js获取当前页码

有些 Button.I 无法在 iframe 中打开 pdf 文件,就像那样

低于link

我正在使用 pdf.js 直接来自 GitHub Project

我的问题是如何从

获取当前页码

pdf.js

PDFViewerApplication.pdfViewer.currentPageNumber 是一个 getter and setter。示例:

// Go to page 5
PDFViewerApplication.pdfViewer.currentPageNumber = 5;

// Move two pages forward
PDFViewerApplication.pdfViewer.currentPageNumber += 2;