Jump to page in PDF.js with javascript

前端 未结 3 1105
悲&欢浪女
悲&欢浪女 2021-02-04 21:00

I\'m trying to use PDF.js\' viewer to display pdf files on a page.

I\'ve gotten everything working, but I would like to be able to \'jump to\' a specific page in the pdf

3条回答
  •  迷失自我
    2021-02-04 21:18

    if Pdf shown into iframe and you want to navigate to page then use below code. 'docIfram' is iframe tag Id.

    document.getElementById("docIframe").contentWindow.PDFViewerApplication.page=2
    

提交回复
热议问题