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
+26-5Lines changed: 26 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# pdfjs-viewer-element
2
2
3
-
A custom element, based on [PDF.js default viewer](https://mozilla.github.io/pdf.js/web/viewer.html). Supported in all [major browsers](https://caniuse.com/custom-elementsv1) and works with most [JS frameworks](https://custom-elements-everywhere.com/). See [examples](https://alekswebnet.github.io/pdfjs-viewer-element/#demo) of usage in Vue, React and Svelte or pure HTML.
3
+
A custom element, based on [PDF.js default viewer](https://mozilla.github.io/pdf.js/web/viewer.html) and . Supported in all [major browsers](https://caniuse.com/custom-elementsv1) and works with most [JS frameworks](https://custom-elements-everywhere.com/). See [examples](https://alekswebnet.github.io/pdfjs-viewer-element/#demo) of usage in Vue, React and Svelte or pure HTML.
4
4
5
5
⚠️ `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. To use the package you should [download](http://mozilla.github.io/pdf.js/getting_started/) and **place the prebuilt** files to some directory of your project. Then specify the path to this directory with `viewer-path` property (`/pdfjs` by default).
`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)
53
53
54
54
`viewer-path` - Path to PDF.js [prebuilt](http://mozilla.github.io/pdf.js/getting_started/)
55
55
56
-
`locale` - Specifies which language to use in the viewer UI. For a list of the available locales, see [all l10n files](https://github.com/mozilla/pdf.js/tree/master/l10n)
56
+
`locale` - Specifies which language to use in the viewer UI`en-US | ...`. [Available locales](https://github.com/mozilla/pdf.js/tree/master/l10n)
57
57
58
-
`text-layer` - Text layer, that is used for text selection
58
+
`text-layer` - Text layer, that is used for text selection`off | visible | shadow | hover`
59
59
60
60
`page` - Page number
61
61
@@ -67,12 +67,33 @@ Using browser:
67
67
68
68
`pagemode` - Page mode
69
69
70
+
`viewer-css-theme` - Apply automatic, light or dark theme `AUTOMATIC | LIGHT | DARK`. Default is `AUTOMATIC`
71
+
72
+
`viewer-extra-styles` - Add your CSS rules to viewer application
73
+
70
74
For more clarity, see the [Api docs page](https://alekswebnet.github.io/pdfjs-viewer-element/#api).
71
75
76
+
## Viewer extra styles
77
+
78
+
You can add your own CSS rules to the viewer application using `viewer-extra-styles` attribute:
0 commit comments