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 1.0.3 to 1.0.4

2

package.json
{
"name": "vue-pdf",
"version": "1.0.3",
"version": "1.0.4",
"description": "vue.js pdf viewer",

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

@@ -31,19 +31,34 @@ # vue-pdf

### props
#### :src <sup>String / Object<sup>
#### :src <sup>String / Object - default: ''<sup>
The url of the pdf file. `src` may also be a `string|TypedArray|DocumentInitParameters|PDFDataRangeTransport` for more details, see [`PDFJS.getDocument()`](https://github.com/mozilla/pdf.js/blob/8ff1fbe7f819513e7d0023df961e3d223b35aefa/src/display/api.js#L117).
#### :page <sup>Number<sup>
#### :page <sup>Number - default: 1<sup>
The page number to display.
#### :password <sup>Function(updatePassword, reason)<sup>
#### :rotate <sup>Number - default: 0<sup>
The page rotation in degrees, only multiple of 90 are valid.
#### :password <sup>Function(updatePassword, reason) - default: null<sup>
* `updatePassword`: The function to call with the pdf password.
* `reason`: the reason why this function is called `'NEED_PASSWORD'` or `'INCORRECT_PASSWORD'`
### events
#### @progress <sup>Number<sup>
Document loading progress. Range [0, 1].
#### @loaded
Triggered when the document is loaded.
#### @numPages <sup>Number<sup>
The total number of pages of the pdf.
#### @error <sup>Object<sup>
Triggered when an error occurred.
## To do

@@ -53,6 +68,8 @@

- [ ] Added more advanced examples
- [ ] Add `@progress` event
- [ ] Add `:rotate` prop
- [ ] Make `<resize-sensor>` optional (implies add a `:scale` prop)
- [ ] Handle resize-sensor event throttle
- [x] Add `@progress` event
- [x] Add `:rotate` prop
- [x] Handle PDF.js errors
- [ ] Give access to the text content of the page
- [ ] Make `<resize-sensor>` optional (implies adding a `:scale` prop)
- [x] Handle resize-sensor event throttle
- [ ] Buy more coffee

@@ -59,0 +76,0 @@

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