vue-pdfjs-demo
vue-pdfjs-demo
This project demonstrates how a simple PDF viewer could be implemented using Vue and PDF.js. This is not a fully-featured PDF document viewer with sophisticated controls, but could serve as the basis for one.
To learn more, checkout the series of posts describing how this project was implemented.
- Basic page rendering
- Fetching and rendering lazily
- Extracting a data component
- Refactoring to nested abstract components
Setup
To install the plugin inside your project :
$ npm install vue-pdfjs-demo
Then, copy this code where you want inside you project :
<template>
<VuePdfJs class="grey"
:url="url"
/>
</template>
<script>
import VuePdfJs from "vue-pdfjs-demo/src/App.vue";
export default {
components: {
VuePdfJs
},
data: () => ({
url:'https://cors-anywhere.herokuapp.com/YourUrl.pdf'
})
}
</script>
Some details still need to be fixed. For example :
- Backgrounds
- icons
- css styles
Documentation
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.1.9 | ^2.6.11 | MIT | |
| 1.1.8 | ^2.6.11 | MIT | |
| 1.1.7 | ^2.6.11 | MIT | |
| 1.1.6 | ^2.6.11 | MIT | |
| 1.1.5 | ^2.6.11 | MIT | |
| 1.1.4 | ^2.6.11 | MIT | |
| 1.1.3 | ^2.6.11 | MIT | |
| 1.1.2 | ^2.6.11 | MIT | |
| 1.1.1 | ^2.6.11 | MIT | |
| 1.1.0 | ^2.6.3 | MIT | |
| 1.0.40 | ^2.6.3 | MIT | |
| 1.0.39 | ^2.6.3 | MIT | |
| 1.0.38 | ^2.6.3 | MIT | |
| 1.0.37 | ^2.6.3 | MIT | |
| 1.0.36 | ^2.6.3 | MIT | |
| 1.0.35 | ^2.6.3 | MIT | |
| 1.0.34 | ^2.6.3 | MIT | |
| 1.0.33 | ^2.6.3 | MIT | |
| 1.0.32 | ^2.6.3 | MIT | |
| 1.0.31 | ^2.6.3 | MIT | |
| 1.0.30 | ^2.6.3 | MIT | |
| 1.0.29 | ^2.6.3 | MIT | |
| 1.0.28 | ^2.6.3 | MIT | |
| 1.0.27 | ^2.6.3 | MIT | |
| 1.0.26 | ^2.6.3 | MIT | |
| 1.0.25 | ^2.6.3 | MIT | |
| 1.0.24 | ^2.6.3 | MIT | |
| 1.0.23 | ^2.6.3 | MIT | |
| 1.0.22 | ^2.6.3 | MIT | |
| 1.0.21 | ^2.6.3 | MIT |
Showing the latest 30 of 51. See every release on npm