sandanat / vue-pdf-app

VUEjs v2 PDF viewer based on Mozilla's PDFJS
MIT License
225 stars 103 forks source link

page-number is can't use #88

Open duchanglong opened 3 years ago

duchanglong commented 3 years ago

<VuePdfApp :pdf="pdf" theme="dark" :page-number="5" /> If me set 'page-number' property. Pdf loading after, it's also first page.

ryuya-matsunawa commented 3 years ago

@duchanglong page-number does not work properly. But @pages-rendered work.

<VuePdfApp :pdf="pdf" theme="dark" @pages-rendered="pagesRendered" />

<script>
methods: {
  pagesRendered(vuePdf) {
    setTimeout(() => (pdfApp.pdfViewer.currentPageNumber = "5"))
  }
}
</script>