# vue_pdfjs_viewer

> Vue viewer component built on top of pdfjs

Latest version **0.1.17** (published 2022-04-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install vue_pdfjs_viewer
pnpm add vue_pdfjs_viewer
yarn add vue_pdfjs_viewer
bun add vue_pdfjs_viewer
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.17 |
| Published | 2022-04-18 |
| First published | 2019-09-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 8 |
| Unpacked size | 35.2 MB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | Gabriel Buragev |
| Maintainers | gabrielbu |
| Keywords | vue, pdf, pdfjs, viewer, components |

## Links

- npm: https://www.npmjs.com/package/vue_pdfjs_viewer
- Repository: https://github.com/GabrielBuragev/vue-pdfjs-viewer
- Homepage: https://github.com/GabrielBuragev/vue-pdfjs-viewer#readme
- Issues: https://github.com/GabrielBuragev/vue-pdfjs-viewer/issues
- npm.io page: https://npm.io/package/vue_pdfjs_viewer

## Dependencies (8)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^2.6.11
- [pdfjs-dist](https://npm.io/package/pdfjs-dist.md) 2.0.943
- [vue-dropzone](https://npm.io/package/vue-dropzone.md) git+https://github.com/gabrielburagev/vue-dropzone.git
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.26.0
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.8.3
- [intersection-observer](https://npm.io/package/intersection-observer.md) ^0.7.0
- [vue-in-viewport-mixin](https://npm.io/package/vue-in-viewport-mixin.md) ^2.0.0

## Recent versions

- 0.1.17 (latest) — 2022-04-18
- 0.1.15 — 2022-04-17
- 0.1.14 — 2022-04-16
- 0.1.13 — 2021-11-12
- 0.1.12 — 2021-07-13
- 0.1.11 — 2020-01-29
- 0.1.10 — 2019-10-17
- 0.1.9 — 2019-10-17
- 0.1.8 — 2019-10-01
- 0.1.7 — 2019-10-01
- 0.1.6 — 2019-09-05
- 0.1.5 — 2019-09-05
- 0.1.4 — 2019-09-05
- 0.1.3 — 2019-09-05
- 0.1.2 — 2019-09-05
- … 2 more at https://npm.io/package/vue_pdfjs_viewer/versions

## README

#  vue_pdfjs_viewer


###  Installation

`npm install vue_pdfjs_viewer`

###  Usage in vue

```js

<template>
  <div id="app" style="height:593px">
    <PDFView
      :src.sync="src" // Valid PDF Source (read below for more info)
      ref="pdfView"
      fileName="order" // Name of the file that's going to be downloaded (default: {Date.now()}.pdf )
      :sidebarFeatureVisible="false" // Should the sidebar feature be visible ? (default: true)
      :downloadFeatureVisible="false" // Should the download button feature be active ? (default: true)
      :dropzoneFeatureVisible="false" // Should the pdf dropzone feature be active ? (default: true)
      :toolbarVisible="false" // Should the toolbar be visible ? (default: true)
      scale.sync="scale" // String value for the page scale ["0.75", "1", "1.25", "1.5", "auto"] are supported 
    > 
        <template slot="right-toolbox"></template> <!-- Add more buttons/features on the right side of the toolbar -->
        <template slot="left-toolbox"></template> <!-- Add more buttons/features on the left side of the toolbar -->
        <template slot="error"></template> <!-- Change the error message design -->
        <template slot="loading"></template> <!-- Change the pdf loader design -->
    </PDFView>
  </div>
</template>
<script>
import {PDFView} from 'vue_pdfjs_viewer';
export default {
  components:{
  // ...
    PDFView
  },
  data(){
    return {
      scale: "1.25"
    }
  }
}
</script>
```

  

###  Valid PDF source

* URL (https://example.com/pdf-content.pdf)

* PDF Uint8Array Buffer

* [PDFDataRangeTransport](https://mozilla.github.io/pdf.js/api/draft/PDFDataRangeTransport.html)

* [DocumentInitParameters](https://mozilla.github.io/pdf.js/api/draft/global.html#DocumentInitParameters)

* Base64 encoded PDF buffer

* data:application/pdf;base64, ....

* You can also drag/drop pdf files into the viewer !

---
_Source: https://npm.io/package/vue_pdfjs_viewer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
