Package Exports
- vue-pdf
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-pdf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
vue-pdf
vue.js pdf viewer
Install
npm install --save vue-pdfExample
<template>
<pdf src="./static/relativity.pdf" style="width:50%"></pdf>
</template>
<script>
import pdf from 'vue-pdf'
export default {
components: {
pdf
}
}Demo
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
@progressevent - Add
:rotateprop - Make
<resize-sensor>optional (implies add a:scaleprop) - Handle resize-sensor event throttle
- Buy more coffee