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 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "pdfvuer",
"description": "A PDF viewer for Vue using Mozilla's PDF.js",
"version": "1.0.0",
"version": "1.0.1",
"author": "Gaurav Koley <arkokoley@live.in>",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -1,18 +0,61 @@

# test
# Pdfvuer
> A Vue.js project
> A PDF viewer for Vue using Mozilla's PDF.js
## Build Setup
## Install
```
npm install --save vue-pdf
```
``` bash
# install dependencies
npm install
## Example - basic
```
<template>
<pdf src="./static/relativity.pdf" :page=1></pdf>
</template>
# serve with hot reload at localhost:8080
npm run dev
<script>
import pdf from 'pdfvuer'
# build for production with minification
npm run build
export default {
components: {
pdf
}
}
```
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).
## API
### Props
#### :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 - default: 1<sup>
The page number to display.
#### :rotate <sup>Number - default: 0<sup>
The page rotation in degrees, only multiple of 90 are valid.
#### :scale <sup>Number / String - default: 'page-width'</sup>
The scaling factor. By default, the pdf will be scaled to match the page width
with the container width.
### Events
#### @numpages <sup>Number<sup>
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](https://goodwill.zense.co.in/resources/1)
> Made with :heart: at [IIIT Bangalore](http://iiitb.ac.in)
## License
MIT &copy; [Gaurav Koley](https://gaurav.koley.in), 2018
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