vue-pdf-embed
vue-pdf-embed copied to clipboard
High value width results in unresponsiveness
I want to implement the zooming in/out functionality. I've read from comments in #58 that using scale might results in high memory usage, so I implemented it with the width attribute. However, when zooming to high width (about as wide as my screen) still make the page unresponsive for a certain amount of time (for a resize or something, I'm not exactly sure, also the higher the width value, the longer it takes) then everything go back to normal.
Here's my code:
<script setup lang="ts">
import { ref } from 'vue';
import VuePdfEmbed from 'vue-pdf-embed';
const width = ref<number>(500);
</script>
<template>
<div class="pdf-view-wrapper">
<v-btn @click="width *= 1.25">In</v-btn>
<v-btn @click="width /= 1.25">Out</v-btn>
<VuePdfEmbed
:source="---pdf url---"
:width="width"
></VuePdfEmbed>
</div>
</template>