Socket
Socket
Sign inDemoInstall

pdf-viewer-vue

Package Overview
Dependencies
102
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.6 to 0.2.7

11

package.json
{
"name": "pdf-viewer-vue",
"version": "0.2.6",
"version": "0.2.7",
"description": "PDF viewer component for Vue 2 and Vue 3",

@@ -28,3 +28,3 @@ "keywords": [

"dependencies": {
"pdfjs-dist": "2.5.207"
"pdfjs-dist": "2.12.313"
},

@@ -51,4 +51,4 @@ "devDependencies": {

"url-loader": "^4.1.1",
"vue": "^3.2.24",
"vue-loader": "16",
"vue": "^2.6.12",
"vue-loader": "^15.9.7",
"vue-loader-next": "npm:vue-loader@^16.2.0",

@@ -59,3 +59,4 @@ "vue-style-loader": "^4.1.3",

"webpack-dev-server": "^3.11.2",
"worker-loader": "^3.0.5"
"worker-loader": "^3.0.5",
"vue-template-compiler": "^2.6.14"
},

@@ -62,0 +63,0 @@ "peerDependencies": {

# 📄 pdf-viewer-vue
PDF viewer component for Vue 2 and Vue 3

@@ -9,19 +7,10 @@

## Compatibility
This package is compatible with both Vue 2 and Vue 3. The default exported build is for Vue 3, but `dist` directory also contains a build for Vue 2 (`dist/vue2-pdf-viewer.js`). See the example in [Usage](#usage) section.
## Installation
Depending on the environment, the package can be installed in one of the following ways:
```shell

@@ -33,4 +22,2 @@

```shell

@@ -42,18 +29,9 @@

```html
<script src="https://unpkg.com/pdf-viewer-vue"></script>
```
## Usage
```vue
<template>

@@ -77,3 +55,2 @@ <div>

</div>
</template>

@@ -93,3 +70,2 @@

data() {
return {

@@ -101,40 +77,27 @@ url: '<PDF_URL>',

}
</script>
```
### Props
| Name | Type | Accepted values | Description |
| -------------- | ---------- | --------------------------------------------------------------------------------------------------------------- | ------------------ |
| source | `string` | document `URL` or `Base64` | source of document |
| controls | `string[]` | `[`<br/>`'download',`<br/>`'print',`<br/>`'rotate',`<br/>`'zoom',`<br/>`'catalog',`<br/>`'switchPage',`<br/>`]` | visible controls |
| loading-text | `string` | - | loading text |
| rendering-text | `string` | - | rendering text |
| Name | Type | Accepted values | Description |
| -------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------- | ------------------ |
| source | `string` | document `URL` or `Base64` | source of document |
| controls | `string[]` | `[`<br/>`'download',`<br/>`'print',`<br/>`'rotate',`<br/>`'zoom',`<br/>`'catalog',`<br/>`'switchPage',`<br/>`]` | visible controls |
| loading-text | `string` | - | loading text |
| rendering-text | `string` | - | rendering text |
| settings | `{ defaultZoom: number }` | - | default settings |
### Events
| Name | Value | Description |
| ---------------- | ------------------------------------- | ------------------------------- |
| download | `{source: string; filename: string;}` | pdf file base info |
| loaded | `{total: number}` | document load completed |
| loading-failed | `Error` | failed to load document |
| rendered | - | finished rendering the document |
| rendering-failed | `Error` | failed to render document |
| Name | Value | Description |
| ---------------- | ------------------------------------- | ------------------------------- |
| download | `{source: string; filename: string;}` | pdf file base info |
| loaded | `{total: number}` | document load completed |
| loading-failed | `Error` | failed to load document |
| rendered | - | finished rendering the document |
| rendering-failed | `Error` | failed to render document |
## Examples
```

@@ -144,8 +107,4 @@ TODO: CodeSandbox or JSFiddle

## License
MIT License. Please see [LICENSE file](LICENSE) for more information.
MIT License. Please see [LICENSE file](LICENSE) for more information.

@@ -15,6 +15,6 @@ export const DOWNLOAD = 'download'

PRINT,
DOUBLE,
FULLSCREEN,
ABOUT,
FULLPAGE,
DOUBLE, // TODO
FULLSCREEN, // TODO
ABOUT, // TODO
FULLPAGE, // TODO
ROTATE,

@@ -21,0 +21,0 @@ ZOOM,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc