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 3.0.2 to 3.1.0

2

package.json
{
"name": "vue-pdf",
"version": "3.0.2",
"version": "3.1.0",
"description": "vue.js pdf viewer",

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

@@ -76,2 +76,9 @@ # vue-pdf

### Public static methods
#### createLoadingTask(src)
* `src`: see :src prop
This function creates a PDFJS loading task that can be used and reused as :src property.
##### example

@@ -117,5 +124,32 @@ ```

##### example with multiple pages
##### example - display multiple pages of the same pdf document
```
<template>
<div>
<pdf v-for="i in 4" :key="i" :src="pdfSrc" :page="i"></pdf>
</div>
</template>
<script>
import pdf from 'vue-pdf'
export default {
components: {
pdf
},
data() {
return {
pdfSrc: pdf.createLoadingTask('https://cdn.mozilla.net/pdfjs/tracemonkey.pdf')
}
}
}
</script>
```
##### example - print multiple pages
```
<template>
<button @click="$refs.myPdfComponent.print(100, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])">print</button>

@@ -122,0 +156,0 @@ <pdf ref="myPdfComponent" src="https://cdn.mozilla.net/pdfjs/tracemonkey.pdf"></pdf>

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