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

Change PDF dynamically and rerender #62

Closed
shanke-pvex opened this issue Nov 13, 2023 · 1 comment · Fixed by #65
Closed

Change PDF dynamically and rerender #62

shanke-pvex opened this issue Nov 13, 2023 · 1 comment · Fixed by #65
Labels
enhancement New feature or request

Comments

@shanke-pvex
Copy link

Is it possible to change the pdf source after init?
Here: const { pdf } = usePDF('sample.pdf') the file is fixed.
I want to show different pdf-files in a modal. Therefore i need to change the src and rerender the viewer.

Is it possible?

@TaTo30
Copy link
Owner

TaTo30 commented Nov 15, 2023

There is a way to do it, the example is here: https://tato30.github.io/VuePDF/examples/advanced/multiple_pdf.html

But isn't as reactivity as a vue component should be, i'll look forward to improve this use case. Meanwhile you can workaround as the above example.

@TaTo30 TaTo30 added the enhancement New feature or request label Nov 15, 2023
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

Successfully merging a pull request may close this issue.

2 participants