@papyrus-sdk/engine-pdfjs 0.1.2 → 0.1.3

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 +22 -0
  2. package/package.json +3 -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,6 @@
1
1
  {
2
2
  "name": "@papyrus-sdk/engine-pdfjs",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -18,8 +18,8 @@
18
18
  "access": "public"
19
19
  },
20
20
  "dependencies": {
21
- "@papyrus-sdk/core": "0.1.2",
22
- "@papyrus-sdk/types": "0.1.2"
21
+ "@papyrus-sdk/core": "0.1.3",
22
+ "@papyrus-sdk/types": "0.1.3"
23
23
  },
24
24
  "scripts": {
25
25
  "build": "tsup index.ts --dts --format cjs,esm --out-dir dist --clean --sourcemap"