pdfjs-viewer-element 1.0.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +10 -10
  2. package/package.json +1 -2
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  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).
4
4
 
5
- ⚠️ `pdfjs-viewer-element` uses PDF.js [prebuilt](https://github.com/mozilla/pdf.js/releases/download/v2.15.349/pdfjs-2.15.349-dist.zip), that includes the generic build of PDF.js and the viewer. To use the package you should **extract the prebuilt** file into a public directory of your project.
5
+ ⚠️ `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 `viewerPath` property (by default is '/pdfjs-3.4.120-dist').
6
6
 
7
7
  ## Install
8
8
  ```
@@ -16,21 +16,21 @@ yarn add pdfjs-viewer-element
16
16
  ```
17
17
 
18
18
  ## Usage
19
- Import to your project as module:
19
+
20
+ Extract the PDF.js prebuilt. See demo [example](https://github.com/alekswebnet/pdfjs-viewer-element/tree/master/public).
20
21
 
21
22
  ```javascript
22
23
  import 'pdfjs-viewer-element'
23
24
  ```
24
25
 
25
- Extract the PDF.js prebuilt. See [example](https://github.com/alekswebnet/pdfjs-viewer-element/tree/master/public).
26
-
27
- Use the element inside your template:
28
-
29
26
  ```javascript
30
- <pdfjs-viewer-element
31
- src="/pdfjs-2.15.349-dist/web/compressed.tracemonkey-pldi-09.pdf"
32
- height="100vh">
33
- </pdfjs-viewer-element>
27
+ <pdfjs-viewer-element src="/compressed.tracemonkey-pldi-09.pdf"></pdfjs-viewer-element>
34
28
  ```
29
+
30
+ ## Properties
31
+
32
+ `src` - path to pdf file.
33
+
34
+ `viewerPath` - path to viewer prebuilt directory (by default is '/pdfjs-3.4.120-dist').
35
35
  ## License
36
36
  [MIT](http://opensource.org/licenses/MIT)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdfjs-viewer-element",
3
- "version": "1.0.4",
3
+ "version": "2.0.0",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Oleksandr Shevchuk",
@@ -41,7 +41,6 @@
41
41
  "dependencies": {},
42
42
  "devDependencies": {
43
43
  "@types/node": "^18.7.1",
44
- "lit": "^2.3.0",
45
44
  "typescript": "^4.6.4",
46
45
  "vite": "^3.0.6"
47
46
  }