@papyrus-sdk/engine-pdfjs 0.1.2 → 0.1.4
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.
- package/README.md +22 -0
- package/package.json +20 -3
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Papyrus Engine PDF.js
|
|
2
|
+
|
|
3
|
+
Web engine for PDF documents, powered by PDF.js.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @papyrus-sdk/engine-pdfjs
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { PDFJSEngine } from '@papyrus-sdk/engine-pdfjs';
|
|
15
|
+
import * as pdfjsLib from 'pdfjs-dist';
|
|
16
|
+
|
|
17
|
+
// pdfjsLib is expected as a global in the engine
|
|
18
|
+
(globalThis as any).pdfjsLib = pdfjsLib;
|
|
19
|
+
|
|
20
|
+
const engine = new PDFJSEngine();
|
|
21
|
+
await engine.load({ type: 'pdf', source: { uri: 'https://example.com/book.pdf' } });
|
|
22
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papyrus-sdk/engine-pdfjs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"papyrus",
|
|
7
|
+
"pdf",
|
|
8
|
+
"pdfjs",
|
|
9
|
+
"document",
|
|
10
|
+
"sdk",
|
|
11
|
+
"viewer"
|
|
12
|
+
],
|
|
4
13
|
"main": "dist/index.js",
|
|
5
14
|
"module": "dist/index.mjs",
|
|
6
15
|
"types": "dist/index.d.ts",
|
|
@@ -17,9 +26,17 @@
|
|
|
17
26
|
"publishConfig": {
|
|
18
27
|
"access": "public"
|
|
19
28
|
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/solrachix/Papyrus.git"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://solrachix.github.io/Papyrus/",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/solrachix/Papyrus/issues"
|
|
36
|
+
},
|
|
20
37
|
"dependencies": {
|
|
21
|
-
"@papyrus-sdk/core": "0.1.
|
|
22
|
-
"@papyrus-sdk/types": "0.1.
|
|
38
|
+
"@papyrus-sdk/core": "0.1.3",
|
|
39
|
+
"@papyrus-sdk/types": "0.1.3"
|
|
23
40
|
},
|
|
24
41
|
"scripts": {
|
|
25
42
|
"build": "tsup index.ts --dts --format cjs,esm --out-dir dist --clean --sourcemap"
|