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

vue.js pdf viewer

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18K
decreased by-10.4%
Maintainers
1
Weekly downloads
 
Created
Source

vue-pdf

vue.js pdf viewer

Install

npm install --save vue-pdf

Example

<template>
  <pdf src="./static/relativity.pdf" style="width:50%"></pdf>
</template>

<script>
import pdf from 'vue-pdf'

export default {
  components: {
    pdf
  }
}

Demo

vue-pdf demo on jsfiddle

API

props

:src String / Object

The url of the pdf file. src may also be a string|TypedArray|DocumentInitParameters|PDFDataRangeTransport for more details, see PDFJS.getDocument().

:page Number

The page number to display.

:password Function(updatePassword, reason)
  • updatePassword: The function to call with the pdf password.
  • reason: the reason why this function is called 'NEED_PASSWORD' or 'INCORRECT_PASSWORD'

events

@numPages Number

The total number of pages of the pdf.

To do

  • Simplified non-webpack integration
  • Added more advanced examples
  • Add @progress event
  • Add :rotate prop
  • Make <resize-sensor> optional (implies add a :scale prop)
  • Handle resize-sensor event throttle
  • Buy more coffee

Credits

Franck Freiburger

Keywords

FAQs

Package last updated on 07 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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