Migrate to new pdf viewer

This commit is contained in:
Vincent Schmandt 2023-12-31 18:27:08 +01:00
parent 70c213ad22
commit e65d755104
No known key found for this signature in database
GPG key ID: FA5B5F9C571C0669
5 changed files with 140 additions and 8 deletions

View file

@ -21,9 +21,12 @@
<div :style="{ height: pdfHeight + 'px' }" class="overflow-hidden m-auto">
<div class="flex items-center justify-center">
<div :style="{ width: pdfWidth + 'px', height: pdfHeight + 'px' }" class="overflow-auto">
<div>
<div v-if="loadedRatio > 0 && loadedRatio < 1" style="background-color: green; color: white; text-align: center" :style="{ width: loadedRatio * 100 + '%' }">{{ Math.floor(loadedRatio * 100) }}%</div>
<pdf ref="pdf" class="m-auto z-10 border border-black border-opacity-20 shadow-md" :src="pdfDocInitParams" :page="page" :rotate="rotate" @progress="progressEvt" @error="error" @num-pages="numPagesLoaded" @link-clicked="page = $event" @loaded="loadedEvt"></pdf>
<pdf ref="pdf" :src="pdfDocInitParams" :page="page" class="m-auto z-10 border border-black border-opacity-20 shadow-md" @link-clicked="page = $event" @numpages="numPagesLoaded" @loaded="loadedEvt" :scale.sync="scale" :style="{ scale: scale * 50 + '%' }">
<template slot="loading"> loading content here... </template>
</pdf>
</div>
</div>
</div>
@ -34,7 +37,8 @@
</template>
<script>
import pdf from '@teckel/vue-pdf'
import pdf from 'pdfvuer'
/*import pdf from '@teckel/vue-pdf'*/
export default {
components: {