You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+15-10
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,19 @@
1
1
# vue-pdf
2
-
vue.js pdf viewer
2
+
vue.js pdf viewer is a package for Vue that enables you to display and view PDF's easily via vue components.
3
3
4
-
## Install
4
+
## Install via NPM/Yarn
5
5
```bash
6
-
npm install --save vue-pdf
6
+
npm install vue-pdf
7
+
```
8
+
9
+
```bash
10
+
yarn add vue-pdf
7
11
```
8
12
9
13
## Example - basic
10
14
```vue
11
15
<template>
12
-
<pdf src="./static/relativity.pdf"></pdf>
16
+
<pdf src="./path/to/static/relativity.pdf"></pdf>
13
17
</template>
14
18
15
19
<script>
@@ -39,13 +43,14 @@ since v2.x, the script is exported as esm.
39
43
### Props
40
44
41
45
#### :src <sup>String / Object - default: ''<sup>
42
-
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).
46
+
The url of the given pdf. `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).
43
47
44
48
#### :page <sup>Number - default: 1<sup>
45
49
The page number to display.
46
50
47
51
#### :rotate <sup>Number - default: 0<sup>
48
52
The page rotation in degrees, only multiple of 90 are valid.
53
+
EG: 90, 180, 270, 360, ...
49
54
50
55
### Events
51
56
@@ -57,19 +62,19 @@ The page rotation in degrees, only multiple of 90 are valid.
0 commit comments