how to use useVuePdfEmbed ? #230
Answered
by
hrynko
thethreedays
asked this question in
Q&A
-
How to use this method and why I can't get the total number of pages |
Beta Was this translation helpful? Give feedback.
Answered by
hrynko
Jul 25, 2024
Replies: 1 comment
-
Hi @thethreedays, The following is the minimal example of using the <script setup>
import VuePdfEmbed, { useVuePdfEmbed } from 'vue-pdf-embed'
const { doc } = useVuePdfEmbed({ source: '<PDF_SOURCE>' })
</script>
<template>
<p v-if="doc">Pages: {{ doc.numPages }}</p>
<VuePdfEmbed :source="doc" />
</template> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hrynko
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @thethreedays,
The following is the minimal example of using the
useVuePdfEmbed
composable and displaying the number of pages: