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

时间:2017-02-24 12:56:38

标签: javascript jquery pdf.js

我想在用户

时从 pdf.js 获取当前的页码

点击一下Button.I不能在 iframe 中打开pdf文件

链接

using iframe

我直接从GitHub Project

使用pdf.js

我的问题是如何从

获取当前页码

pdf.js

1 个答案:

答案 0 :(得分:3)

PDFViewerApplication.pdfViewer.currentPageNumberenter image description here。例子:

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

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