vip

vue-instant-pdf-viewer

Vue PDF Viewer based on PDF Object

Showing:

Popularity

Downloads/wk

325

Maintenance

No Maintenance Data Available

Package

Dependencies

1

License

Type Definitions

Tree-Shakeable

No?

Categories

Vue PDF Viewer

Readme

vue-pdf-viewer

Vue PDF Viewer based on PDF Object

Installation

npm install --save vue-instant-pdf-viewer

Dependencies

Please include pdf.object.js from https://pdfobject.com

<!-- please select either unminimied or minified version -->
<script src="/static/lib/pdfobject.js"></script>
<script src="/static/lib/pdfobject.min.js"></script>

Usage

Javascript

import Vue from 'vue'
import VuePDFViewer from 'vue-pdf-viewer'

new Vue({
  el: '#app',
  data: {
    url: 'https://bitcoin.org/bitcoin.pdf',
  },
  components: {
    'vue-pdf-viewer': VuePDFViewer
  }
});

HTML

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>vue-pdf-viewer</title>
    <script src="/static/lib/pdfobject.min.js"></script>
  </head>
  <body>
    <div id="app">
      <vue-pdf-viewer height="500px" :url="url">
      </vue-pdf-viewer>
    </div>
  </body>
</html>

Preview

vue-pdf-viewer

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Tutorials

No tutorials found
Add a tutorial