pdf-codec 4.0.9 → 4.0.10
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 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
This is a genuinely large undertaking with an honest trade-off spelled out in [Fidelity](#fidelity): this is not, and does not attempt to be, as robust against adversarial or badly malformed real-world PDFs as a library with 15+ years of hardening. What it buys instead is a dependency-free, fully auditable PDF implementation with no supply-chain surface beyond `document-schema.js`, `fflate`, and `zod`.
|
|
10
10
|
|
|
11
|
-
`documents.js` uses this package to convert docx/pptx/odt/odp/ods/odg to and from PDF, and to render MathML formulas (typeset by its own `src/mathml/` engine) through the embedded math font this package parses and writes. That MathML _layout_ engine deliberately stays in `documents.js` — see [Architecture](#architecture) for exactly where the boundary sits and why a real `MathBox` value crosses it with zero cast or wrapper.
|
|
11
|
+
`documents.js` uses this package to convert docx/pptx/odt/odp/ods/odg to and from PDF, and to render MathML formulas (typeset by its own `src/mathml/` engine) through the embedded math font this package parses and writes. That MathML _layout_ engine deliberately stays in `documents.js` — see [Architecture](#architecture) for exactly where the boundary sits and why a real `MathBox` value crosses it with zero cast or wrapper. [`document-outline.js`](https://github.com/ExaDev/documents.js/tree/main/packages/document-outline.js)'s `segmentPdfRegions` ([ExaDev/documents.js#931](https://github.com/ExaDev/documents.js/issues/931)) is a second, independent consumer of this package's `LayoutPage`/`LayoutItem` types alone — a recursive X-Y cut page-segmentation pass classifying a page's own positioned items into columns, tables, figures, and captions, entirely without the semantic reconstruction this package deliberately keeps out of itself.
|
|
12
12
|
|
|
13
13
|
```mermaid
|
|
14
14
|
graph TD
|
|
@@ -21,23 +21,28 @@ graph TD
|
|
|
21
21
|
documents("documents.js")
|
|
22
22
|
mcp("document-mcp")
|
|
23
23
|
cli("document-cli")
|
|
24
|
+
outline("document-outline.js")
|
|
24
25
|
|
|
25
26
|
schema --> ooxml
|
|
26
27
|
schema --> odf
|
|
27
28
|
schema --> pdfcodec
|
|
28
29
|
schema --> mdcodec
|
|
29
30
|
schema --> documents
|
|
31
|
+
schema --> outline
|
|
30
32
|
ooxml --> documents
|
|
31
33
|
odf --> documents
|
|
32
34
|
pdfcodec --> documents
|
|
33
35
|
mdcodec --> documents
|
|
34
36
|
bytecodec --> pdfcodec
|
|
35
37
|
bytecodec --> documents
|
|
38
|
+
pdfcodec --> outline
|
|
36
39
|
documents --> mcp
|
|
37
40
|
pdfcodec --> mcp
|
|
38
41
|
documents --> cli
|
|
39
42
|
odf --> cli
|
|
40
43
|
pdfcodec --> cli
|
|
44
|
+
outline --> mcp
|
|
45
|
+
outline --> cli
|
|
41
46
|
|
|
42
47
|
click schema "https://github.com/ExaDev/documents.js/tree/main/packages/document-schema.js" "document-schema.js"
|
|
43
48
|
click ooxml "https://github.com/ExaDev/documents.js/tree/main/packages/ooxml.js" "ooxml.js"
|
|
@@ -48,6 +53,7 @@ graph TD
|
|
|
48
53
|
click documents "https://github.com/ExaDev/documents.js" "documents.js"
|
|
49
54
|
click mcp "https://github.com/ExaDev/documents.js/tree/main/packages/document-mcp" "document-mcp"
|
|
50
55
|
click cli "https://github.com/ExaDev/documents.js/tree/main/packages/document-cli" "document-cli"
|
|
56
|
+
click outline "https://github.com/ExaDev/documents.js/tree/main/packages/document-outline.js" "document-outline.js"
|
|
51
57
|
|
|
52
58
|
style pdfcodec fill:#f9a825,stroke:#333,stroke-width:3px
|
|
53
59
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdf-codec",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.10",
|
|
4
4
|
"description": "Hand-written, dependency-minimal PDF codec: parses arbitrary real-world PDFs and generates new ones, built on its own codec-owned LayoutDocument item model and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"packageManager": "pnpm@11.6.0",
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"byte-codec": "1.4.1",
|
|
103
|
-
"document-schema.js": "7.
|
|
103
|
+
"document-schema.js": "7.4.0",
|
|
104
104
|
"fflate": "0.8.3",
|
|
105
105
|
"zod": "4.4.3"
|
|
106
106
|
},
|