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
A web component for [PDF.js viewer](https://mozilla.github.io/pdf.js/web/viewer.html). See [demo](https://alekswebnet.github.io/pdfjs-viewer-element/index.html).
7
+
A web component for viewing pdf files in the browser. The package is based on [PDF.js viewer](https://mozilla.github.io/pdf.js/web/viewer.html) build and works with any framework. See [demo](https://alekswebnet.github.io/pdfjs-viewer-element/index.html).
8
8
9
-
⚠️ `pdfjs-viewer-element` uses PDF.js [prebuilt](https://github.com/mozilla/pdf.js/releases/download/v3.4.120/pdfjs-3.4.120-dist.zip), that includes the generic build of PDF.js and the viewer. To use the package you should **extract the prebuilt** files into some directory of your project. You may specify the path to this directory with `viewer-path` property (by default is '/pdfjs').
9
+
⚠️ `pdfjs-viewer-element` uses PDF.js [prebuilt](http://mozilla.github.io/pdf.js/getting_started/), that includes the generic build of PDF.js and the viewer. To use the package you should download and **place the prebuilt** files to some directory of your project. You may specify the path to this directory with `viewer-path` property (`/pdfjs`by default).
10
10
11
11
## Install
12
12
```
@@ -25,7 +25,7 @@ or
25
25
26
26
## Usage
27
27
28
-
Extract the PDF.js prebuilt. See demo [example](https://github.com/alekswebnet/pdfjs-viewer-element/tree/master/public).
28
+
Place **PDF.js prebuilt** files to some directory of your project (`pdfjs` used as the standard name). See demo [example](https://github.com/alekswebnet/pdfjs-viewer-element/tree/master/public). You may call the directory as you want, but then you should specify the `viewer-path` property.
29
29
30
30
```javascript
31
31
import'pdfjs-viewer-element'
@@ -39,6 +39,10 @@ import 'pdfjs-viewer-element'
39
39
40
40
`src` - path to pdf file.
41
41
42
-
`viewer-path` - path to prebuilt directory (by default is '/pdfjs').
42
+
`viewer-path` - path to prebuilt directory (`/pdfjs` by default).
43
+
44
+
`locale` - language localization (e.g. 'en', 'en-US', 'es', 'de'), see [pdf.js i10n files](https://github.com/mozilla/pdf.js/tree/master/l10n) (the language of your browser by default)
43
45
## License
44
-
[MIT](http://opensource.org/licenses/MIT)
46
+
For this package - [MIT](http://opensource.org/licenses/MIT).
47
+
48
+
For the `pdf.js` library - https://github.com/mozilla/pdf.js/blob/master/LICENSE.
0 commit comments