Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-pdf

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-pdf - npm Package Compare versions

Comparing version 2.0.4 to 3.0.0

4

package.json
{
"name": "vue-pdf",
"version": "2.0.4",
"version": "3.0.0",
"description": "vue.js pdf viewer",

@@ -23,5 +23,5 @@ "main": "src/pdf.vue",

"dependencies": {
"pdfjs-dist": "^2.0.183",
"pdfjs-dist": "^2.0.250",
"vue-resize-sensor": "^2.0.0"
}
}

@@ -60,6 +60,6 @@ # vue-pdf

#### @pageLoaded <sup>Number<sup>
#### @page-loaded <sup>Number<sup>
Triggered when a page is loaded.
#### @numPages <sup>Number<sup>
#### @num-pages <sup>Number<sup>
The total number of pages of the pdf.

@@ -85,2 +85,34 @@

##### example - current page / page count
```
<template>
<div>
{{currentPage}} / {{pageCount}}
<pdf
src="https://cdn.mozilla.net/pdfjs/tracemonkey.pdf"
@num-pages="pageCount = $event"
@page-loaded="currentPage = $event"
></pdf>
</div>
</template>
<script>
import pdf from 'vue-pdf'
export default {
components: {
pdf
},
data() {
return {
currentPage: 0,
pageCount: 0,
}
}
}
</script>
```
##### example with multiple pages

@@ -108,3 +140,3 @@ ```

<div v-if="loadedRatio > 0 && loadedRatio < 1" style="background-color: green; color: white; text-align: center" :style="{ width: loadedRatio * 100 + '%' }">{{ Math.floor(loadedRatio * 100) }}%</div>
<pdf v-if="show" ref="pdf" style="border: 1px solid red" :src="src" :page="page" :rotate="rotate" @password="password" @progress="loadedRatio = $event" @error="error" @numPages="numPages = $event"></pdf>
<pdf v-if="show" ref="pdf" style="border: 1px solid red" :src="src" :page="page" :rotate="rotate" @password="password" @progress="loadedRatio = $event" @error="error" @num-pages="numPages = $event"></pdf>
</div>

@@ -111,0 +143,0 @@ </div>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc