pdfjs-viewer-element
Advanced tools
Comparing version 2.5.4 to 2.5.5
{ | ||
"name": "pdfjs-viewer-element", | ||
"version": "2.5.4", | ||
"version": "2.5.5", | ||
"license": "MIT", | ||
@@ -32,2 +32,12 @@ "author": { | ||
], | ||
"devDependencies": { | ||
"@types/node": "^18.7.1", | ||
"@vitest/browser": "^1.2.1", | ||
"jsdom": "^22.1.0", | ||
"perfect-debounce": "^1.0.0", | ||
"typescript": "^4.6.4", | ||
"vite": "^5.0.12", | ||
"vitest": "^1.2.1", | ||
"webdriverio": "^8.28.8" | ||
}, | ||
"scripts": { | ||
@@ -38,13 +48,3 @@ "dev": "vite", | ||
"coverage": "vitest run --coverage" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.7.1", | ||
"@vitest/browser": "^0.34.3", | ||
"jsdom": "^22.1.0", | ||
"perfect-debounce": "^1.0.0", | ||
"typescript": "^4.6.4", | ||
"vite": "^4.5.2", | ||
"vitest": "^0.34.3", | ||
"webdriverio": "^8.16.7" | ||
} | ||
} | ||
} |
<p align="center"> | ||
<img src="https://alekswebnet.github.io/pdfjs-viewer-element/logo.svg" width="64"/> | ||
<img src="https://alekswebnet.github.io/pdfjs-viewer-element/logo.svg" width="60"/> | ||
</p> | ||
<h1 align="center">pdfjs-viewer-element</h1> | ||
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), works with most used [JS frameworks](https://custom-elements-everywhere.com/). | ||
Probably the simplest integration of PDF.js viewer. | ||
The package provide 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 static HTML page. | ||
⚠️ `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. | ||
@@ -23,4 +22,6 @@ | ||
Then specify the path to this directory with `viewer-path` property (`/pdfjs` by default). | ||
Then specify the path to the directory with `viewer-path` property (`/pdfjs` by default). | ||
See [examples](https://alekswebnet.github.io/pdfjs-viewer-element/#demo) of usage in Vue, React, Svelte or simple HTML page. | ||
## Status | ||
@@ -49,2 +50,4 @@ | ||
yarn add pdfjs-viewer-element | ||
# With pnpm | ||
pnpm add pdfjs-viewer-element | ||
``` | ||
@@ -65,3 +68,3 @@ | ||
```html | ||
<pdfjs-viewer-element src="/file.pdf" viewer-path="/path-to-viewer"></pdfjs-viewer-element> | ||
<pdfjs-viewer-element src="/pdf-file.pdf" viewer-path="/pdfjs-4.0.379-dist"></pdfjs-viewer-element> | ||
``` | ||
@@ -93,3 +96,3 @@ | ||
For more clarity, see the [Api docs page](https://alekswebnet.github.io/pdfjs-viewer-element/#api). | ||
Play with attributes on [Api docs page](https://alekswebnet.github.io/pdfjs-viewer-element/#api). | ||
@@ -96,0 +99,0 @@ ## Viewer CSS theme |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
63182309
141
24