27 lines
506 B
Vue
27 lines
506 B
Vue
<script setup lang="ts">
|
|
import { VuePDF, usePDF } from '@tato30/vue-pdf';
|
|
const props = defineProps<{
|
|
url: string;
|
|
}>();
|
|
|
|
const { pdf, pages } = usePDF(props.url);
|
|
</script>
|
|
|
|
<template>
|
|
<section v-for="page in pages" class="content">
|
|
<VuePDF style="width: 100%" :pdf="pdf" :page="page" :scale="1.5" />
|
|
</section>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.content :deep(canvas) {
|
|
width: 100% !important;
|
|
height: auto !important;
|
|
}
|
|
|
|
@media print {
|
|
.content :deep(canvas) {
|
|
scale: 1.1;
|
|
}
|
|
}
|
|
</style>
|