我希望在用户点击某个按钮时,从pdf.js中获取当前页面号。我没有像using iframe">此链接那样在iframe中打开pdf文件。我直接从GitHub Project">GitHub项目中使用pdf.js。我的问题是如何获取当前页码。
pdf.js
pdf.js
PDFViewerApplication.pdfViewer.currentPageNumber
是一个获取器和设置器。示例:
// Go to page 5
PDFViewerApplication.pdfViewer.currentPageNumber = 5;
// Move two pages forward
PDFViewerApplication.pdfViewer.currentPageNumber += 2;