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
+33-9Lines changed: 33 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,6 @@
1
1
# pdfjs-viewer-element
2
2
3
-
Custom element that embeds [PDF.js default viewer](https://mozilla.github.io/pdf.js/web/viewer.html) using the `iframe`.
4
-
5
-
The package provides a custom element, based on PDF.js [viewer options](https://github.com/mozilla/pdf.js/wiki/Viewer-options) and [URL parameters](https://github.com/mozilla/pdf.js/wiki/Debugging-PDF.js#url-parameters) API.
6
-
7
-
Supported in all [major browsers](https://caniuse.com/custom-elementsv1), and works with most [JS frameworks](https://custom-elements-everywhere.com/).
@@ -17,11 +13,12 @@ Supported in all [major browsers](https://caniuse.com/custom-elementsv1), and wo
17
13
- Standalone isolated web component with no runtime dependencies
18
14
- Drop-in, iframe-based PDF.js default viewer for any web app
19
15
- Works with same-origin and cross-origin PDF documents
20
-
- Configure via attributes and URL parameters (page, zoom, search, pagemode, locale)
16
+
- Configure via attributes (page, zoom, search, pagemode, locale)
21
17
- Programmatic access to `PDFViewerApplication` via the `initPromise` public property
22
-
- Theme control (automatic/light/dark) plus custom CSS injection
18
+
- Built-in Paper & Ink default theme, with theme control (automatic/light/dark) and custom CSS injection
19
+
- Resource path attributes for PDF.js internals (`worker-src`, `c-map-url`, `icc-url`, `standard-font-data-url`, `wasm-url`, and more)
23
20
- Locale override support using PDF.js viewer locales
24
-
- Supports all modern browsers and most JS frameworks
21
+
- Supports all [major browsers](https://caniuse.com/custom-elementsv1) and most [JS frameworks](https://custom-elements-everywhere.com/).
25
22
26
23
## Docs
27
24
@@ -89,6 +86,13 @@ The element is block-level and needs an explicit height.
89
86
|`locale-src-template`| Locale file URL template. Must contain `{locale}` placeholder. Used together with `locale`. |`https://cdn.jsdelivr.net/gh/mozilla-l10n/firefox-l10n@main/{locale}/toolkit/toolkit/pdfviewer/viewer.ftl`|
0 commit comments