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
**⚠️ This is an important part, please read this FIRST !!!**
34
-
35
-
**You should download and place the PDF.js prebuilt files in the project.**
36
-
37
-
`pdfjs-viewer-element` requires [PDF.js prebuilt](http://mozilla.github.io/pdf.js/getting_started/), that includes the generic build of PDF.js and the viewer.
38
-
39
-
The prebuilt comes with each PDF.js release. [PDF.JS releases](https://github.com/mozilla/pdf.js/releases)
40
-
41
-
✅ All v3, v4 and v5 releases are fully supported.
42
-
43
-
After placing the prebuild specify the path to the directory with the `viewer-path` property (`/pdfjs` by default) and PDF file URL with `src` property (should refer to the [same origin](https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#can-i-load-a-pdf-from-another-server-cross-domain-request)).
31
+
[Various use cases](https://github.com/alekswebnet/pdfjs-viewer-element/tree/master/demo)
44
32
45
33
## Install
46
34
@@ -49,8 +37,6 @@ After placing the prebuild specify the path to the directory with the `viewer-pa
`src` - PDF file URL, should refer to the [same origin](https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#can-i-load-a-pdf-from-another-server-cross-domain-request)
77
63
78
-
`viewer-path` - Path to PDF.js [prebuilt](http://mozilla.github.io/pdf.js/getting_started/)
79
-
80
64
`iframe-title` - The title of the `iframe` element, required for better accessibility
`disable-worker` - Disables the worker, `true` to enable.
95
-
96
-
`text-layer` - Disables or reveals the text layer that is used for text selection, `off | visible | shadow | hover`.
97
-
98
-
`disable-font-face` - Disables standard `@font-face` font loading and uses the internal font renderer instead, `true` to enable.
99
-
100
-
`disable-range` - Disables HTTP range requests when fetching the document, `true` to enable.
101
-
102
-
`disable-stream` - Disables streaming when fetching the document, `true` to enable.
103
-
104
-
`disable-auto-fetch`- Disables auto fetching of the document; only gets necessary data to display the current view. Note: streaming also needs to be disabled for this to have any effect, `true` to enable.
105
-
106
-
`verbosity`- Specifies the verbosity level of console messages. `0` - only errors, `1` - warnings and errors, `5` - warnings, errors and information messages.
107
-
108
76
`locale` - Specifies which language to use in the viewer UI, `en-US | ...`. [Available locales](https://github.com/mozilla/pdf.js/tree/master/l10n)
109
77
110
78
`viewer-css-theme` - Apply automatic, light, or dark theme, `AUTOMATIC | LIGHT | DARK`
@@ -113,7 +81,7 @@ import 'pdfjs-viewer-element'
113
81
114
82
`viewer-extra-styles-urls` - Add external CSS files to the viewer application, pass an array with URLs.
115
83
116
-
Play with attributes on [Api docs page](https://alekswebnet.github.io/pdfjs-viewer-element/#api).
84
+
Play with attributes on [API docs page](https://alekswebnet.github.io/pdfjs-viewer-element/#api).
117
85
118
86
## Viewer CSS theme
119
87
@@ -122,7 +90,6 @@ Use `viewer-css-theme` attribute to set light or dark theme manually:
122
90
```html
123
91
<pdfjs-viewer-element
124
92
src="/file.pdf"
125
-
viewer-path="/pdfjs-5.3.93-dist"
126
93
viewer-css-theme="DARK">
127
94
</pdfjs-viewer-element>
128
95
```
@@ -134,7 +101,6 @@ You can add your own CSS rules to the viewer application using `viewer-extra-sty
0 commit comments