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

pdfvuer

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdfvuer

A PDF viewer for Vue using Mozilla's PDF.js

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Pdfvuer

A PDF viewer for Vue using Mozilla's PDF.js

Install

npm install --save vue-pdf

Example - basic

<template>
  <pdf src="./static/relativity.pdf" :page=1></pdf>
</template>

<script>
import pdf from 'pdfvuer'

export default {
  components: {
    pdf
  }
}

API

Props

:src String / Object - default: ''

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

:page Number - default: 1

The page number to display.

:rotate Number - default: 0

The page rotation in degrees, only multiple of 90 are valid.

:scale Number / String - default: 'page-width'

The scaling factor. By default, the pdf will be scaled to match the page width with the container width.

Events

@numpages Number

The total number of pages of the 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.

Public Demo

Used in production by Gratiato

Made with :heart: at IIIT Bangalore

License

MIT © Gaurav Koley, 2018

FAQs

Package last updated on 20 Jun 2018

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