modern-pdf-lib 0.12.1 → 0.13.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.
- package/README.md +7 -5
- package/dist/index.cjs +686 -152
- package/dist/index.d.cts +393 -10
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +393 -10
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +680 -153
- package/dist/{libdeflateWasm-CRFwmrSl.mjs → libdeflateWasm-DlHgU5oy.mjs} +2 -2
- package/dist/{libdeflateWasm-DeU6cupL.cjs → libdeflateWasm-OkNoqBnO.cjs} +2 -2
- package/dist/{loader-CZMj0gBy.mjs → loader-CQfoGFp9.mjs} +4 -3
- package/dist/{loader-DWwMj8jZ.cjs → loader-_fqS-TmT.cjs} +4 -3
- package/dist/{pdfPage-JiCJLV3x.mjs → pdfPage-B7vA518n.mjs} +644 -216
- package/dist/{pdfPage-BMGFx7Xd.cjs → pdfPage-BebMv6fN.cjs} +672 -214
- package/dist/{pngEmbed-CHyesD7i.mjs → pngEmbed-DTOqgEUC.mjs} +2 -2
- package/dist/{pngEmbed-1RWu6KsO.cjs → pngEmbed-OYyOe_W0.cjs} +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Create, parse, fill, merge, sign, and manipulate PDF documents<br />in Node, Den
|
|
|
15
15
|
|
|
16
16
|
[](https://www.npmjs.com/package/modern-pdf-lib)
|
|
17
17
|
[](https://bundlephobia.com/package/modern-pdf-lib)
|
|
18
|
-
[](#)
|
|
19
19
|
[](#)
|
|
20
20
|
[](LICENSE)
|
|
21
21
|
|
|
@@ -69,6 +69,7 @@ const blob = await doc.saveAsBlob(); // Blob (browsers)
|
|
|
69
69
|
- Automatic font subsetting
|
|
70
70
|
- JPEG / PNG image embedding
|
|
71
71
|
- RGB, CMYK, grayscale colors
|
|
72
|
+
- Linear & radial gradients, tiling patterns
|
|
72
73
|
- Text layout (multiline, combed, auto-size)
|
|
73
74
|
|
|
74
75
|
</td>
|
|
@@ -195,7 +196,7 @@ const blob = await doc.saveAsBlob(); // Blob (browsers)
|
|
|
195
196
|
<td align="center">No</td></tr>
|
|
196
197
|
|
|
197
198
|
<tr><td><strong>WASM acceleration</strong></td>
|
|
198
|
-
<td align="center">Optional (compression, PNG, fonts)</td>
|
|
199
|
+
<td align="center">Optional (compression, PNG, fonts, JBIG2)</td>
|
|
199
200
|
<td align="center">No</td></tr>
|
|
200
201
|
|
|
201
202
|
<tr><td><strong>Dependencies</strong></td>
|
|
@@ -407,6 +408,7 @@ await initWasm({
|
|
|
407
408
|
| png | PNG image decoding | ~5x |
|
|
408
409
|
| ttf | Font parsing & subsetting | ~3x |
|
|
409
410
|
| shaping | Complex script layout | ~10x |
|
|
411
|
+
| jbig2 | JBIG2 bilevel image decoding | ~3x |
|
|
410
412
|
|
|
411
413
|
<br />
|
|
412
414
|
|
|
@@ -428,8 +430,8 @@ modern-pdf-lib/
|
|
|
428
430
|
layers/ Optional content groups (OCG)
|
|
429
431
|
outline/ Bookmarks / document outline
|
|
430
432
|
metadata/ XMP metadata, viewer preferences
|
|
431
|
-
wasm/ Rust crate sources (
|
|
432
|
-
tests/
|
|
433
|
+
wasm/ Rust crate sources (5 modules)
|
|
434
|
+
tests/ 2,199 tests across 100 suites
|
|
433
435
|
docs/ VitePress documentation
|
|
434
436
|
```
|
|
435
437
|
|
|
@@ -441,7 +443,7 @@ modern-pdf-lib/
|
|
|
441
443
|
git clone https://github.com/ABCrimson/modern-pdf-lib.git
|
|
442
444
|
cd modern-pdf-lib
|
|
443
445
|
npm install
|
|
444
|
-
npm test #
|
|
446
|
+
npm test # 2,199 tests
|
|
445
447
|
npm run typecheck # TypeScript 6.0 strict
|
|
446
448
|
npm run build # ESM + CJS + declarations
|
|
447
449
|
```
|