vuetify-pdfjs
nice but Simple PDF viewer. Needs vuetify@2 and @mdi/js.
This project demonstrates how a simple PDF viewer could be implemented using Vue, Vuetify and PDF.js. This is not a fully-featured PDF document viewer with sophisticated controls, but could serve as the basis for one.
Versions
1.2.3 : Blurred pages corrected.
1.2.4 : Correct paginator color.
1.2.5 : Update vue version to 2.7.14.
Setup
To install the plugin inside your project :
$ npm install vuetify-pdfjs
$ npm install vuetify
$ npm install @mdi/js -D
And, in your main.js file :
import Vuetify from "vuetify";
Then, copy this code where you want inside you project :
<template>
<v-carousel :show-arrows="false" :hide-delimiters="true" class="carousel">
<VuetifyPdf
:url="url"
/>
</v-carousel>
</template>
<script>
import VuetifyPdf from "vuetify-pdfjs/src/App.vue";
export default {
components: {
VuetifyPdf
},
data: () => ({
url:'https://cors-anywhere.herokuapp.com/YourUrl.pdf'
})
}
</script>
<style>
.carousel {
background-color: #606f7b;
}
</style>