Open jjakob666 opened 2 months ago
I had this problem. I used a timeout when starting the preview.
vuejs 3
<template>
<div class="col-12 mb-3" v-if="initialized">
<PDFViewer
:source="route('document.contract', 18)"
/>
</div>
</template>
<script setup>
import PDFViewer from 'pdf-viewer-vue'
const initialized = ref(false)
onMounted(() => {
setTimeout(() => {
initialized.value = true
}, 500)
})
</script>
After load the viewer displays the page thumnail but not the page. If I resize the browser the page then displays. it seems to be a resize issue.
I added this code after render and it resolved the issue: