Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyway to get current page number when page changed? #103

Open
sebarswee opened this issue Jul 4, 2022 · 1 comment
Open

Anyway to get current page number when page changed? #103

sebarswee opened this issue Jul 4, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@sebarswee
Copy link

Please describe a feature/problem.
get the page number when page changed

Describe the solution you'd like
emit some page change event when page changed

Describe alternatives you've considered

Additional context

@sebarswee sebarswee added the enhancement New feature or request label Jul 4, 2022
@sebarswee
Copy link
Author

sebarswee commented Aug 19, 2022

I've figured it out.

<vue-pdf-app @pages-rendered="onRender" />
onRender (pdfApp) {
  pdfApp.pdfViewer.eventBus.on('pagechanging', ({ pageNumber }) => {
    this.$emit('pageChange', pageNumber)
  })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants