js.documents 1.58.0 → 1.59.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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![GitHub](https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white)](https://github.com/ExaDev/documents.js) [![npm](https://img.shields.io/badge/npm-CB3837?logo=npm&logoColor=white)](https://www.npmjs.com/package/documents.js) [![Release](https://img.shields.io/github/v/release/ExaDev/documents.js)](https://github.com/ExaDev/documents.js/releases/latest) [![CI](https://img.shields.io/github/actions/workflow/status/ExaDev/documents.js/ci.yml?branch=main)](https://github.com/ExaDev/documents.js/actions)
4
4
 
5
- > Bidirectional docx/pptx/odt/odp/ods/odg PDF conversion, a resolver-driven odm (ODF master document) PDF conversion for multi-chapter documents, six further cross-format bridges (odt⇄docx, odp⇄pptx, ods⇄xlsx) that bypass PDF entirely, `.odb` (ODF database front-end) table extraction to xlsx/CSV from an embedded HSQLDB TEXT script (Tier 1), HSQLDB's own binary CACHED-table row-store format (Tier 2), and an embedded Firebird database's own gbak logical-backup format (Tier 3), a read-and-write live-view editor for docx/pptx/odt/odp/ods/odg content, a hand-written MathML presentation-layer typesetting engine with embedded-font PDF rendering (odf → PDF, plus formulas embedded inside odt/odp), and a fully hand-written PDF codec, built on [ooxml.js](https://github.com/ExaDev/ooxml.js) and [odf.js](https://github.com/ExaDev/odf.js).
5
+ > Converts between any two compatible document formats through a shared content/layout pivot — docx, pptx, odt, odp, ods, odg, and xlsx all read into and build from the same `ContentDocument`/`LayoutDocument` model, with PDF simply the one format every variant can reach (docx/pptx/odt/odp/ods/odg/xlsx ⇄ PDF, thirteen pairs, all round-tripping both ways), plus six further cross-format bridges (odt⇄docx, odp⇄pptx, ods⇄xlsx) that bypass PDF entirely for pairs already sharing a pivot variant directly. Also included: a resolver-driven odm (ODF master document) → PDF conversion for multi-chapter documents, `.odb` (ODF database front-end) table extraction to xlsx/CSV from an embedded HSQLDB TEXT script (Tier 1), HSQLDB's own binary CACHED-table row-store format (Tier 2), and an embedded Firebird database's own gbak logical-backup format (Tier 3), a read-and-write live-view editor for docx/pptx/odt/odp/ods/odg content, a hand-written MathML presentation-layer typesetting engine with embedded-font PDF rendering (odf → PDF, plus formulas embedded inside odt/odp), and a fully hand-written PDF codec, built on [ooxml.js](https://github.com/ExaDev/ooxml.js) and [odf.js](https://github.com/ExaDev/odf.js).
6
6
 
7
7
  `documents.js` depends on `ooxml.js` for lossless docx/pptx/xlsx ⇄ JSON handling and extends it in two directions `ooxml.js` deliberately does not cover: full PDF support (parsing arbitrary real-world PDFs and generating new ones), and a read-**and-write** manipulation API for docx/pptx content — `ooxml.js`'s own typed readers (`readDocx`/`readPptx`) are one-way and explicitly forbid write-back. PDF reading, writing, and the docx⇄PDF/pptx⇄PDF conversion pipeline are provided by [`pdf-codec`](https://github.com/ExaDev/pdf-codec), a sibling package extracted from this one: a hand-written, dependency-minimal PDF codec with no external PDF library (`pdf-lib`, `pdfjs-dist`, `mupdf`, or any other) as a dependency — see pdf-codec's own README for how it's built and what it embeds (including the vendored STIX Two Math font this package renders formulas through). `src/mathml/` (the MathML typesetting engine) stays in this package and is hand-written too, for the same "no supply-chain surface beyond what's already declared" reason, but consumes pdf-codec's embedded math font through a structurally-typed port rather than any font-parsing code of its own — see [Architecture](#architecture).
8
8
 
@@ -59,10 +59,10 @@ npm install documents.js
59
59
 
60
60
  ## Usage
61
61
 
62
- The twelve round-trip ergonomic conversions (docx/pptx/odt/odp/ods/odg ⇄ PDF, all now round-trip both ways):
62
+ The twelve round-trip ergonomic conversions between the six formats with their own layout engine and PDF (docx/pptx/odt/odp/ods/odg ⇄ PDF, all round-trip both ways), plus a thirteenth pair with the identical ergonomic shape and options — `xlsxToPdf`/`pdfToXlsx`, which composes the ods⇄xlsx bridge with the ods⇄pdf layout pair internally, since xlsx has no layout engine of its own:
63
63
 
64
64
  ```ts
65
- import { docxToPdf, odgToPdf, odpToPdf, odsToPdf, odtToPdf, pdfToDocx, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pptxToPdf, pdfToPptx } from 'documents.js';
65
+ import { docxToPdf, odgToPdf, odpToPdf, odsToPdf, odtToPdf, pdfToDocx, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToPdf, xlsxToPdf } from 'documents.js';
66
66
 
67
67
  const pdfBytes = docxToPdf(docxBytes);
68
68
  const docxBytes2 = pdfToDocx(pdfBytes);
@@ -81,9 +81,12 @@ const odgBytes2 = pdfToOdg(pdfFromOdg);
81
81
 
82
82
  const pdfFromOds = odsToPdf(odsBytes);
83
83
  const odsBytes2 = pdfToOds(pdfFromOds); // recovers what was printed, not what was entered -- see Fidelity
84
+
85
+ const pdfFromXlsx = xlsxToPdf(xlsxBytes); // composes xlsxToOds -> odsToPdf internally -- still a real, direct, single-call conversion
86
+ const xlsxBytes2 = pdfToXlsx(pdfFromXlsx); // composes pdfToOds -> odsToXlsx internally
84
87
  ```
85
88
 
86
- Each accepts an optional `signal` (`AbortSignal`) and either a `onSubstitution` callback (docx/pptx/odt/odp/ods/odg → PDF, called once per character not representable in a standard-14 font) or a `sink` (PDF → docx/pptx/odt/odp/ods/odg, called once per recoverable parse diagnostic).
89
+ Each accepts an optional `signal` (`AbortSignal`) and either a `onSubstitution` callback (docx/pptx/odt/odp/ods/odg/xlsx → PDF, called once per character not representable in a standard-14 font) or a `sink` (PDF → docx/pptx/odt/odp/ods/odg/xlsx, called once per recoverable parse diagnostic).
87
90
 
88
91
  Six further conversions bypass PDF entirely: `odtToDocx`/`docxToOdt`, `odpToPptx`/`pptxToOdp`, and `odsToXlsx`/`xlsxToOds` each compose a direct `readXContent` → `buildYPackage` pivot copy, since both sides of each pair already read into and build from the identical `ContentDocument` variant — no layout engine, no font measurement, and no geometry-based reconstruction in between. See [Fidelity](#fidelity) for what that means in practice.
89
92
 
@@ -262,7 +265,7 @@ try {
262
265
  }
263
266
  ```
264
267
 
265
- `odmToPdf` is not one of the twelve round-trip conversions or the six bridges above, has no `z.codec()` pair, and is not wired into the `DocumentConverter` port below — see Gotchas for why.
268
+ `odmToPdf` is not one of the thirteen round-trip conversions or the six bridges above, has no `z.codec()` pair, and is not wired into the `DocumentConverter` port below — see Gotchas for why.
266
269
 
267
270
  `.odb` (ODF database front-end) support: `readOdbTables` extracts every table an embedded database declares, and `odbToXlsx`/`odbToCsv` turn that straight into xlsx or CSV bytes. Three embedded storage shapes are supported, dispatched automatically from the package's own connection URL and, for HSQLDB, its own per-table storage shape: a MEMORY/TEXT table's rows inline in `database/script` as ordinary TEXT-format SQL (Tier 1, `src/hsqldb/script.ts`), a CACHED table's rows in a separate binary page-cache file, `database/data` (Tier 2, `src/hsqldb/cache.ts`/`rowformat.ts` — LibreOffice's own embedded-HSQLDB default, see Architecture/Gotchas for the exact scope and version pinning), and a Firebird database's own `database/firebird.fbk` part — LibreOffice's modern default embedded engine since 4.1, a genuine gbak logical-backup stream rather than a raw on-disk database file (Tier 3; see the Gotchas entry below for the empirical finding this rests on). A caller never needs to know which shape or engine a given `.odb` used. HSQLDB's own whole-script BINARY/COMPRESSED serialisation is the one embedded shape still out of scope (see Gotchas/Fidelity):
268
271
 
@@ -294,7 +297,7 @@ import { odfToPdf } from 'documents.js';
294
297
  const pdfBytes = odfToPdf(odfBytes); // a single formula (or small formula document), faithfully typeset -- see Fidelity
295
298
  ```
296
299
 
297
- `odfToPdf` is not one of the twelve round-trip conversions above either: there is no `pdfToOdf` (recovering structured MathML from rendered glyphs is a categorically different, OCR-adjacent problem, not a geometry-reconstruction one — see [Fidelity](#fidelity)), no `z.codec()` pair, and — unlike `odmToPdf` — it *is* wired into the `DocumentConverter` port below, as a `DocumentFormat: 'odf'` source with only a `'pdf'` target.
300
+ `odfToPdf` is not one of the thirteen round-trip conversions above either: there is no `pdfToOdf` (recovering structured MathML from rendered glyphs is a categorically different, OCR-adjacent problem, not a geometry-reconstruction one — see [Fidelity](#fidelity)), no `z.codec()` pair, and — unlike `odmToPdf` — it *is* wired into the `DocumentConverter` port below, as a `DocumentFormat: 'odf'` source with only a `'pdf'` target.
298
301
 
299
302
  Standalone `.odf` files are rare in practice; a formula embedded inside an odt paragraph or an odp slide is the far more common real-world case, and `odtToPdf`/`odpToPdf` already render one automatically wherever `readOdtContent`/`readOdpContent` find a `draw:frame` referencing an embedded formula sub-object — no extra code needed at the call site:
300
303
 
@@ -396,7 +399,7 @@ To run a single test file: `pnpm vitest run src/path/to/file.test.ts`.
396
399
  - **`readPdf` tracks general vector paths, not just axis-aligned rectangles — pdf-codec's own capability, with a direct consequence for this package's `pdfToOds`/`reconstructDrawing`.** A stroked-and-filled rect, any ellipse, and any plain line each come back from a real PDF round trip as a generic `LayoutPath` rather than their original kind (see pdf-codec's own `interpret.ts` gotcha for the exact fast-path boundary and the ISO 32000-1 operators involved). This is the shared infrastructure both `pdfToOds` and `reconstructDrawing` need; both now use it. A direct, practical consequence for `pdfToOds`: `readPdf` never reconstructs a `'line'` kind item at all, so a gridline written by `sheets.ts`'s own `renderGridlines` always comes back from a real PDF round trip as a generic, single-subpath, single-line-segment, stroke-only `LayoutPath` — `reconstructSpreadsheet`'s own gridline-lattice detection accepts both shapes (a genuine `LayoutLine` item and this stroked-single-segment `LayoutPath` shape) for exactly this reason.
397
400
  - **`pdfToOds` recovers what was printed, not what was entered.** `reconstructSpreadsheet` (`src/layout/reconstruct.ts`) tries a real gridline lattice first: it scans the page's `LayoutLine`/stroked-single-segment-`LayoutPath` items (see the `interpret.ts` gotcha above) for enough parallel horizontal and vertical lines at consistent positions to call it a printed grid (`MIN_GRIDLINE_COUNT_PER_AXIS = 3` per axis, i.e. at least a 2×2 grid, and a span-consistency check that rejects a scatter of unrelated short strokes — a page border or a couple of decorative rules — as not a genuine lattice), and uses those line positions DIRECTLY as cell boundaries when found. Absent a lattice, it clusters text into a grid from geometry alone instead: rows reuse `clusterIntoLines` verbatim (a spreadsheet cell's own text is never wrapped across lines, so a text line already IS a row), and columns generalise `clusterIntoParagraphs`'s own single `dominantLeftX` to several recurring x-position anchors, first merging directly-adjacent same-line fragments (`splitLineByLargeGaps`, the same >2em-gap signal `reconstructPresentation`'s own block clustering uses) so a cell whose text arrived as several run-level-split `LayoutText` items isn't scattered across spurious columns. Column widths and row heights are genuinely measured from whichever geometry was used (drawn gridline gaps, or measured text/anchor extents), never invented. Every recovered cell is a bare string carrying only its own extracted `displayText` — **never** re-parsed into a number/date/boolean, and never claimed as a formula, even when the text looks numeric or date-shaped; see [Fidelity](#fidelity) for the full framing. `buildOdsPackage` (`src/edit/ods/content.ts`) is `pdfToOds`'s own package-building half, mirroring `buildOdtPackage`/`buildOdpPackage`/`buildOdgPackage`'s role for `pdfToOdt`/`pdfToOdp`/`pdfToOdg`.
398
401
  - **`buildOdsPackage` now writes `printSettings` for real, via a new `OdsSheet.printSettings` getter/setter (`src/edit/ods/print-settings.ts`) — discovered as a genuine blocker while building `pdfToOds`'s own round-trip verification, not a pre-planned feature.** `OdsEditor`/`OdsSheet` previously had no width/height/print-settings API at all, so `buildOdsPackage` silently dropped `ContentSheetPrintSettings` entirely; that made a reconstructed sheet's own recovered `gridlines`/`headers`/`pageSize` unverifiable by any real write-then-reread round trip, which is exactly what `pdfToOds`'s own test needed to prove. The setter mints a fresh `style:page-layout` (`styles.xml`/`office:automatic-styles`) + `style:master-page` (`styles.xml`/`office:master-styles`) + `style:style[family="table"]` (`content.xml`/`office:automatic-styles`) triple and repoints the sheet's own `table:style-name` to it on every call, rather than mutating whatever it was pointing at before — the same append-only style-editing convention `src/edit/odg/style.ts` already documents. Scoped to the five fields `ContentSheetPrintSettingsSchema` always carries (`pageSize`/`margins`/`gridlines`/`headers`/`pageOrder`); `printRange`/`scale`/`fitToPages`/`repeatRows`/`repeatColumns`/`manualBreaks` (all optional, and never set by `reconstructSpreadsheet`) are still not read or written — resolving them needs the same table-wide repeated-column/row cursor tracking `odf.js`'s own `readTable` does before ever calling its own `readPrintSettings`, a genuinely separate, larger undertaking than this getter/setter's own scope.
399
- - **`OdsSheet`/`OdsEditor` still have no column-width or row-height setter at all discovered the same way as the `printSettings` gap above, while building `pdfToOds`'s own smoke-test coverage.** `OdsSheet.cell()`'s own column/row-materialisation (`address.ts`) creates a real, explicit `table:table-column`/`table:table-row` element for any position a caller ever addresses, but never gives it a width/height style. This is a genuinely different failure shape from a column/row with NO element at all: `sheets.ts`'s own `resolveAxis` only falls back to `DEFAULT_COLUMN_WIDTH_PT`/`DEFAULT_ROW_HEIGHT_PT` for an index with no `ContentSheetColumn`/`ContentSheetRow` entry whatsoever — an explicit-but-unstyled element reads back at `widthPt`/`heightPt` 0 (`odf.js`'s own `resolveColumnWidthPt`/`readRowLayout`), and that explicit zero wins over the fallback. A sheet built purely through `createOds()`/`OdsSheet.cell()` therefore renders with a zero-size grid real content needs an explicit column-width/row-height style, exactly as a real LibreOffice-authored file always has one (see `src/test-support/ods.ts`'s own fixtures, which set one deliberately). `buildOdsPackage` (`src/edit/ods/content.ts`) documents this as a tracked, bounded gap alongside `ContentSheetImage`/`embeddedObjects`, mirroring `buildOdtPackage`'s own identical image/colSpan-write gaps.
402
+ - **`OdsSheet` now has a real column-width/row-height setter (`setColumnWidth`/`setRowHeight`, `src/edit/ods/column-row.ts`), closing a gap that escalated from cosmetic to a genuine correctness bug once `xlsxToPdf`/`pdfToXlsx` started composing through `buildOdsPackage` internally.** `OdsSheet.cell()`'s own column/row-materialisation (`address.ts`) creates a real, explicit `table:table-column`/`table:table-row` element for any position a caller ever addresses, but previously never gave it a width/height style. This is a genuinely different failure shape from a column/row with NO element at all: `sheets.ts`'s own `resolveAxis` only falls back to `DEFAULT_COLUMN_WIDTH_PT`/`DEFAULT_ROW_HEIGHT_PT` for an index with no `ContentSheetColumn`/`ContentSheetRow` entry whatsoever — an explicit-but-unstyled element reads back at `widthPt`/`heightPt` 0 (`odf.js`'s own `resolveColumnWidthPt`/`readRowLayout`), and that explicit zero wins over the fallback. While `buildOdsPackage`'s own output was only ever a terminal deliverable (`pdfToOds`, or a caller's own `readOdsContent` round trip), this was cosmetic: a real app reopening it would use its own defaults instead of the source's. `xlsxToPdf` (`xlsxToOds` then `odsToPdf`) made it a real bug instead — the intermediate ods bytes get laid out again by `convertSpreadsheetToLayout`, and a zero-size grid collapses every cell onto the same physical position rather than merely losing precision. `setColumnWidth`/`setRowHeight` mint a fresh `style:style[family="table-column"|"table-row"]` per column/row and repoint its own `table:style-name`, the same append-only style-minting convention `writeSheetPrintSettings`/`src/edit/odg/style.ts` already establish; `buildOdsPackage` now calls both for every `ContentSheetColumn`/`ContentSheetRow` a source sheet carries. Column/row HIDDEN state (`table:visibility`, a plain attribute rather than a style property) remains a separate, still-untracked write-side gap, alongside `ContentSheetImage`/`embeddedObjects` mirroring `buildOdtPackage`'s own identical image/colSpan-write gaps.
400
403
  - **`reconstructDrawing` maps recovered geometry back onto ODF shapes near-1:1, with no clustering — but PDF's own content-stream operators still force several `ContentVector` kinds to collapse to a generic `path` on the way through.** Every painted `LayoutItem` maps onto a `ContentVector`/`ContentShape` directly, in the exact z-order it was recovered — `LayoutRect` → `rect`, `LayoutEllipse` → `ellipse`, `LayoutLine` → `line`, `LayoutPath` → `path`, `LayoutText`/`LayoutImage` → `ContentShape` — a fundamentally more tractable problem than `reconstructWordprocessing`/`reconstructPresentation`'s own paragraph/shape geometry clustering, since a drawing has no semantic structure to infer at all. The catch is upstream of `reconstructDrawing` itself, in what `readPdf` can even hand it: pdf-codec's own `LayoutRect` fast path only fires for a fill-only rectangle under a non-rotated CTM (see the general-vector-path-tracking gotcha above), `writeEllipse` always emits an ellipse as four cubic Beziers with no PDF-level marker that it started life as an ellipse, and `readPdf` never reconstructs a `'line'` kind item at all — so a stroked-and-filled rect, any ellipse, and any line each come back from a PDF as a generic `LayoutPath`, and `reconstructDrawing` correctly maps that to a `ContentVector` `'path'`, not the shape's original kind. Position, size, and fill/stroke colour still survive (within ordinary floating-point/string-formatting tolerance); only the vector's own discriminant kind narrows to whatever PDF's content-stream operators actually distinguish. A `path` vector's own reconstructed `frame` is a further, separate approximation: it is the *tight* bounding box of every recovered point, cubic control points included (a cubic curve is guaranteed to lie within their convex hull, so this never clips the curve) — which can legitimately be *larger* than whatever frame the original path's own author declared, if that frame didn't tightly bound its own control points to begin with (a real, valid ODF/SVG authoring pattern: a `viewBox`/frame is a declared coordinate window, not a guaranteed tight bounding box). A single original drawing text box that PDF's own greedy line-wrapper split across several lines does **not** reconstruct as one multi-line shape: `reconstructDrawing` maps each recovered `LayoutText` item to its own separate `ContentShape` (the same one-`LayoutItem`-to-one-shape rule every other kind follows), so a wrapped multi-line text box comes back as several small, independently-positioned text boxes, one per original line — confirmed visually against real LibreOffice (see the real-file verification note below); the full text content still survives, just redistributed. `buildOdgPackage` (`src/edit/odg/content.ts`) is `pdfToOdg`'s own package-building half, mirroring `buildOdtPackage`/`buildOdpPackage`'s role for `pdfToOdt`/`pdfToOdp`.
401
404
  - **Two real, confirmed-against-actual-LibreOffice-rendering fill bugs were fixed as part of building `reconstructDrawing`/`pdfToOdg`, not by it.** Both are pre-existing gaps in code that `reconstructDrawing`'s own real-file verification exposed, not something the reconstruction algorithm itself introduced, and both apply to every `.odg` this package writes, not only a reconstructed one: (1) `src/edit/odg/style.ts`'s `graphicPropertyAttrs` wrote `draw:fill-color` alone, with no accompanying `draw:fill="solid"` — real LibreOffice 26.2 fills a `draw:rect`/`draw:ellipse` that way fine, but silently renders a `draw:path` with the identical omission as unfilled, even with a fill colour declared. `draw:fill="solid"` is now written explicitly whenever a fill is set, for every vector kind. (2) `writeEllipse` (pdf-codec's own `content-write.ts`) never emitted a PDF closepath (`h`) operator, even though its four Bezier arcs already return exactly to their own starting point — PDF fill operators close every subpath implicitly regardless (ISO 32000-1 8.5.3.1), but `readPdf`'s own general path tracking only marks a subpath `closed: true` when it actually sees an explicit `h`, so a PDF-round-tripped ellipse came back with `closed: false`, which correctly-behaving ODF/SVG consumers then refuse to fill even with `draw:fill="solid"` set. `writeEllipse` now emits `h` before its paint operator, drawing no additional ink (the path was already geometrically closed) but recording that closure explicitly.
402
405
  - **A vector primitive's own fill/stroke needed a self-contained graphic-family style writer, not `odf.js`'s own `StyleRegistry`.** `'graphic'` is a recognised `StyleFamily` member (`odf.js`'s `src/styles/registry.ts`), but `StylePropertiesSchema`/`buildStylePropertyElements` (`properties.ts`/`serialize.ts`) only ever model text/paragraph formatting and never emit a `style:graphic-properties` element for any family — extending that shared package for one narrow, documents.js-local need (`draw:fill(-color)`/`draw:stroke` + `svg:stroke-color`/`svg:stroke-width`) would be scope creep into a foreign package for a two-attribute-group writer this package can express directly. `src/edit/odg/style.ts` is that writer: it still reuses `odf.js`'s general append-only style-editing invariant (a setter always mints a fresh `style:style` and repoints `draw:style-name`, never mutates an existing entry — verified by the same `assertAutomaticStylesOnlyAppended` helper `OdpEditor`'s own live-view fidelity test uses) and `src/edit/odt/automatic-styles.ts`'s `ensureAutomaticStyles`/`nextStyleName` (the "find-or-create `office:automatic-styles`, mint the next unused name" logic every other hand-rolled style helper in this package already shares), rather than a third reimplementation of either.
@@ -0,0 +1,198 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_convert_convert = require("./convert.cjs");
3
+ //#region src/convert/capability.ts
4
+ const FORMAT_CAPABILITIES = {
5
+ docx: {
6
+ format: "docx",
7
+ variant: "wordprocessing",
8
+ hasLayoutPath: true
9
+ },
10
+ odt: {
11
+ format: "odt",
12
+ variant: "wordprocessing",
13
+ hasLayoutPath: true
14
+ },
15
+ pptx: {
16
+ format: "pptx",
17
+ variant: "presentation",
18
+ hasLayoutPath: true
19
+ },
20
+ odp: {
21
+ format: "odp",
22
+ variant: "presentation",
23
+ hasLayoutPath: true
24
+ },
25
+ ods: {
26
+ format: "ods",
27
+ variant: "spreadsheet",
28
+ hasLayoutPath: true
29
+ },
30
+ xlsx: {
31
+ format: "xlsx",
32
+ variant: "spreadsheet",
33
+ hasLayoutPath: false
34
+ },
35
+ odg: {
36
+ format: "odg",
37
+ variant: "drawing",
38
+ hasLayoutPath: true
39
+ },
40
+ odf: {
41
+ format: "odf",
42
+ hasLayoutPath: false
43
+ },
44
+ pdf: {
45
+ format: "pdf",
46
+ hasLayoutPath: false
47
+ }
48
+ };
49
+ const DIRECT_EDGES = [
50
+ {
51
+ kind: "toPdf",
52
+ source: "docx",
53
+ target: "pdf",
54
+ convert: require_convert_convert.docxToPdf
55
+ },
56
+ {
57
+ kind: "toPdf",
58
+ source: "pptx",
59
+ target: "pdf",
60
+ convert: require_convert_convert.pptxToPdf
61
+ },
62
+ {
63
+ kind: "toPdf",
64
+ source: "odt",
65
+ target: "pdf",
66
+ convert: require_convert_convert.odtToPdf
67
+ },
68
+ {
69
+ kind: "toPdf",
70
+ source: "odp",
71
+ target: "pdf",
72
+ convert: require_convert_convert.odpToPdf
73
+ },
74
+ {
75
+ kind: "toPdf",
76
+ source: "ods",
77
+ target: "pdf",
78
+ convert: require_convert_convert.odsToPdf
79
+ },
80
+ {
81
+ kind: "toPdf",
82
+ source: "odg",
83
+ target: "pdf",
84
+ convert: require_convert_convert.odgToPdf
85
+ },
86
+ {
87
+ kind: "toPdf",
88
+ source: "odf",
89
+ target: "pdf",
90
+ convert: require_convert_convert.odfToPdf
91
+ },
92
+ {
93
+ kind: "toPdf",
94
+ source: "xlsx",
95
+ target: "pdf",
96
+ convert: require_convert_convert.xlsxToPdf
97
+ },
98
+ {
99
+ kind: "fromPdf",
100
+ source: "pdf",
101
+ target: "docx",
102
+ convert: require_convert_convert.pdfToDocx
103
+ },
104
+ {
105
+ kind: "fromPdf",
106
+ source: "pdf",
107
+ target: "pptx",
108
+ convert: require_convert_convert.pdfToPptx
109
+ },
110
+ {
111
+ kind: "fromPdf",
112
+ source: "pdf",
113
+ target: "odt",
114
+ convert: require_convert_convert.pdfToOdt
115
+ },
116
+ {
117
+ kind: "fromPdf",
118
+ source: "pdf",
119
+ target: "odp",
120
+ convert: require_convert_convert.pdfToOdp
121
+ },
122
+ {
123
+ kind: "fromPdf",
124
+ source: "pdf",
125
+ target: "ods",
126
+ convert: require_convert_convert.pdfToOds
127
+ },
128
+ {
129
+ kind: "fromPdf",
130
+ source: "pdf",
131
+ target: "odg",
132
+ convert: require_convert_convert.pdfToOdg
133
+ },
134
+ {
135
+ kind: "fromPdf",
136
+ source: "pdf",
137
+ target: "xlsx",
138
+ convert: require_convert_convert.pdfToXlsx
139
+ },
140
+ {
141
+ kind: "bridge",
142
+ source: "odt",
143
+ target: "docx",
144
+ convert: require_convert_convert.odtToDocx
145
+ },
146
+ {
147
+ kind: "bridge",
148
+ source: "docx",
149
+ target: "odt",
150
+ convert: require_convert_convert.docxToOdt
151
+ },
152
+ {
153
+ kind: "bridge",
154
+ source: "odp",
155
+ target: "pptx",
156
+ convert: require_convert_convert.odpToPptx
157
+ },
158
+ {
159
+ kind: "bridge",
160
+ source: "pptx",
161
+ target: "odp",
162
+ convert: require_convert_convert.pptxToOdp
163
+ },
164
+ {
165
+ kind: "bridge",
166
+ source: "ods",
167
+ target: "xlsx",
168
+ convert: require_convert_convert.odsToXlsx
169
+ },
170
+ {
171
+ kind: "bridge",
172
+ source: "xlsx",
173
+ target: "ods",
174
+ convert: require_convert_convert.xlsxToOds
175
+ }
176
+ ];
177
+ function resolveConversionPath(source, target, edges = DIRECT_EDGES) {
178
+ if (source === target) return;
179
+ const direct = edges.find((edge) => edge.source === source && edge.target === target);
180
+ if (direct !== void 0) return {
181
+ kind: "direct",
182
+ edge: direct
183
+ };
184
+ for (const first of edges) {
185
+ if (first.source !== source) continue;
186
+ const second = edges.find((edge) => edge.source === first.target && edge.target === target);
187
+ if (second !== void 0) return {
188
+ kind: "composed",
189
+ via: first.target,
190
+ first,
191
+ second
192
+ };
193
+ }
194
+ }
195
+ //#endregion
196
+ exports.DIRECT_EDGES = DIRECT_EDGES;
197
+ exports.FORMAT_CAPABILITIES = FORMAT_CAPABILITIES;
198
+ exports.resolveConversionPath = resolveConversionPath;
@@ -0,0 +1,42 @@
1
+ import { DocumentBridgeOptions, DocumentToPdfOptions, PdfToDocumentOptions } from "./convert.cjs";
2
+ import { DocumentFormat } from "./port.cjs";
3
+ //#region src/convert/capability.d.ts
4
+ type ContentVariant = 'wordprocessing' | 'presentation' | 'spreadsheet' | 'drawing';
5
+ interface FormatCapability {
6
+ readonly format: DocumentFormat;
7
+ readonly variant?: ContentVariant;
8
+ readonly hasLayoutPath: boolean;
9
+ }
10
+ declare const FORMAT_CAPABILITIES: Readonly<Record<DocumentFormat, FormatCapability>>;
11
+ interface ToPdfEdge {
12
+ readonly kind: 'toPdf';
13
+ readonly source: DocumentFormat;
14
+ readonly target: 'pdf';
15
+ readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: DocumentToPdfOptions) => Uint8Array<ArrayBuffer>;
16
+ }
17
+ interface FromPdfEdge {
18
+ readonly kind: 'fromPdf';
19
+ readonly source: 'pdf';
20
+ readonly target: DocumentFormat;
21
+ readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: PdfToDocumentOptions) => Uint8Array<ArrayBuffer>;
22
+ }
23
+ interface BridgeEdge {
24
+ readonly kind: 'bridge';
25
+ readonly source: DocumentFormat;
26
+ readonly target: DocumentFormat;
27
+ readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: DocumentBridgeOptions) => Uint8Array<ArrayBuffer>;
28
+ }
29
+ type ConversionEdge = ToPdfEdge | FromPdfEdge | BridgeEdge;
30
+ declare const DIRECT_EDGES: readonly ConversionEdge[];
31
+ type ConversionStrategy = {
32
+ readonly kind: 'direct';
33
+ readonly edge: ConversionEdge;
34
+ } | {
35
+ readonly kind: 'composed';
36
+ readonly via: DocumentFormat;
37
+ readonly first: ConversionEdge;
38
+ readonly second: ConversionEdge;
39
+ };
40
+ declare function resolveConversionPath(source: DocumentFormat, target: DocumentFormat, edges?: readonly ConversionEdge[]): ConversionStrategy | undefined;
41
+ //#endregion
42
+ export { BridgeEdge, ContentVariant, ConversionEdge, ConversionStrategy, DIRECT_EDGES, FORMAT_CAPABILITIES, FormatCapability, FromPdfEdge, ToPdfEdge, resolveConversionPath };
@@ -0,0 +1,42 @@
1
+ import { DocumentBridgeOptions, DocumentToPdfOptions, PdfToDocumentOptions } from "./convert.js";
2
+ import { DocumentFormat } from "./port.js";
3
+ //#region src/convert/capability.d.ts
4
+ type ContentVariant = 'wordprocessing' | 'presentation' | 'spreadsheet' | 'drawing';
5
+ interface FormatCapability {
6
+ readonly format: DocumentFormat;
7
+ readonly variant?: ContentVariant;
8
+ readonly hasLayoutPath: boolean;
9
+ }
10
+ declare const FORMAT_CAPABILITIES: Readonly<Record<DocumentFormat, FormatCapability>>;
11
+ interface ToPdfEdge {
12
+ readonly kind: 'toPdf';
13
+ readonly source: DocumentFormat;
14
+ readonly target: 'pdf';
15
+ readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: DocumentToPdfOptions) => Uint8Array<ArrayBuffer>;
16
+ }
17
+ interface FromPdfEdge {
18
+ readonly kind: 'fromPdf';
19
+ readonly source: 'pdf';
20
+ readonly target: DocumentFormat;
21
+ readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: PdfToDocumentOptions) => Uint8Array<ArrayBuffer>;
22
+ }
23
+ interface BridgeEdge {
24
+ readonly kind: 'bridge';
25
+ readonly source: DocumentFormat;
26
+ readonly target: DocumentFormat;
27
+ readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: DocumentBridgeOptions) => Uint8Array<ArrayBuffer>;
28
+ }
29
+ type ConversionEdge = ToPdfEdge | FromPdfEdge | BridgeEdge;
30
+ declare const DIRECT_EDGES: readonly ConversionEdge[];
31
+ type ConversionStrategy = {
32
+ readonly kind: 'direct';
33
+ readonly edge: ConversionEdge;
34
+ } | {
35
+ readonly kind: 'composed';
36
+ readonly via: DocumentFormat;
37
+ readonly first: ConversionEdge;
38
+ readonly second: ConversionEdge;
39
+ };
40
+ declare function resolveConversionPath(source: DocumentFormat, target: DocumentFormat, edges?: readonly ConversionEdge[]): ConversionStrategy | undefined;
41
+ //#endregion
42
+ export { BridgeEdge, ContentVariant, ConversionEdge, ConversionStrategy, DIRECT_EDGES, FORMAT_CAPABILITIES, FormatCapability, FromPdfEdge, ToPdfEdge, resolveConversionPath };
@@ -0,0 +1,195 @@
1
+ import { docxToOdt, docxToPdf, odfToPdf, odgToPdf, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToPdf, pdfToDocx, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToOdp, pptxToPdf, xlsxToOds, xlsxToPdf } from "./convert.js";
2
+ //#region src/convert/capability.ts
3
+ const FORMAT_CAPABILITIES = {
4
+ docx: {
5
+ format: "docx",
6
+ variant: "wordprocessing",
7
+ hasLayoutPath: true
8
+ },
9
+ odt: {
10
+ format: "odt",
11
+ variant: "wordprocessing",
12
+ hasLayoutPath: true
13
+ },
14
+ pptx: {
15
+ format: "pptx",
16
+ variant: "presentation",
17
+ hasLayoutPath: true
18
+ },
19
+ odp: {
20
+ format: "odp",
21
+ variant: "presentation",
22
+ hasLayoutPath: true
23
+ },
24
+ ods: {
25
+ format: "ods",
26
+ variant: "spreadsheet",
27
+ hasLayoutPath: true
28
+ },
29
+ xlsx: {
30
+ format: "xlsx",
31
+ variant: "spreadsheet",
32
+ hasLayoutPath: false
33
+ },
34
+ odg: {
35
+ format: "odg",
36
+ variant: "drawing",
37
+ hasLayoutPath: true
38
+ },
39
+ odf: {
40
+ format: "odf",
41
+ hasLayoutPath: false
42
+ },
43
+ pdf: {
44
+ format: "pdf",
45
+ hasLayoutPath: false
46
+ }
47
+ };
48
+ const DIRECT_EDGES = [
49
+ {
50
+ kind: "toPdf",
51
+ source: "docx",
52
+ target: "pdf",
53
+ convert: docxToPdf
54
+ },
55
+ {
56
+ kind: "toPdf",
57
+ source: "pptx",
58
+ target: "pdf",
59
+ convert: pptxToPdf
60
+ },
61
+ {
62
+ kind: "toPdf",
63
+ source: "odt",
64
+ target: "pdf",
65
+ convert: odtToPdf
66
+ },
67
+ {
68
+ kind: "toPdf",
69
+ source: "odp",
70
+ target: "pdf",
71
+ convert: odpToPdf
72
+ },
73
+ {
74
+ kind: "toPdf",
75
+ source: "ods",
76
+ target: "pdf",
77
+ convert: odsToPdf
78
+ },
79
+ {
80
+ kind: "toPdf",
81
+ source: "odg",
82
+ target: "pdf",
83
+ convert: odgToPdf
84
+ },
85
+ {
86
+ kind: "toPdf",
87
+ source: "odf",
88
+ target: "pdf",
89
+ convert: odfToPdf
90
+ },
91
+ {
92
+ kind: "toPdf",
93
+ source: "xlsx",
94
+ target: "pdf",
95
+ convert: xlsxToPdf
96
+ },
97
+ {
98
+ kind: "fromPdf",
99
+ source: "pdf",
100
+ target: "docx",
101
+ convert: pdfToDocx
102
+ },
103
+ {
104
+ kind: "fromPdf",
105
+ source: "pdf",
106
+ target: "pptx",
107
+ convert: pdfToPptx
108
+ },
109
+ {
110
+ kind: "fromPdf",
111
+ source: "pdf",
112
+ target: "odt",
113
+ convert: pdfToOdt
114
+ },
115
+ {
116
+ kind: "fromPdf",
117
+ source: "pdf",
118
+ target: "odp",
119
+ convert: pdfToOdp
120
+ },
121
+ {
122
+ kind: "fromPdf",
123
+ source: "pdf",
124
+ target: "ods",
125
+ convert: pdfToOds
126
+ },
127
+ {
128
+ kind: "fromPdf",
129
+ source: "pdf",
130
+ target: "odg",
131
+ convert: pdfToOdg
132
+ },
133
+ {
134
+ kind: "fromPdf",
135
+ source: "pdf",
136
+ target: "xlsx",
137
+ convert: pdfToXlsx
138
+ },
139
+ {
140
+ kind: "bridge",
141
+ source: "odt",
142
+ target: "docx",
143
+ convert: odtToDocx
144
+ },
145
+ {
146
+ kind: "bridge",
147
+ source: "docx",
148
+ target: "odt",
149
+ convert: docxToOdt
150
+ },
151
+ {
152
+ kind: "bridge",
153
+ source: "odp",
154
+ target: "pptx",
155
+ convert: odpToPptx
156
+ },
157
+ {
158
+ kind: "bridge",
159
+ source: "pptx",
160
+ target: "odp",
161
+ convert: pptxToOdp
162
+ },
163
+ {
164
+ kind: "bridge",
165
+ source: "ods",
166
+ target: "xlsx",
167
+ convert: odsToXlsx
168
+ },
169
+ {
170
+ kind: "bridge",
171
+ source: "xlsx",
172
+ target: "ods",
173
+ convert: xlsxToOds
174
+ }
175
+ ];
176
+ function resolveConversionPath(source, target, edges = DIRECT_EDGES) {
177
+ if (source === target) return;
178
+ const direct = edges.find((edge) => edge.source === source && edge.target === target);
179
+ if (direct !== void 0) return {
180
+ kind: "direct",
181
+ edge: direct
182
+ };
183
+ for (const first of edges) {
184
+ if (first.source !== source) continue;
185
+ const second = edges.find((edge) => edge.source === first.target && edge.target === target);
186
+ if (second !== void 0) return {
187
+ kind: "composed",
188
+ via: first.target,
189
+ first,
190
+ second
191
+ };
192
+ }
193
+ }
194
+ //#endregion
195
+ export { DIRECT_EDGES, FORMAT_CAPABILITIES, resolveConversionPath };
@@ -27,6 +27,10 @@ const odgPdfCodec = zod.z.codec(require_model_bytes.OdgBytesSchema, require_mode
27
27
  decode: (odgBytes) => require_convert_convert.odgToPdf(odgBytes),
28
28
  encode: (pdfBytes) => require_convert_convert.pdfToOdg(pdfBytes)
29
29
  });
30
+ const xlsxPdfCodec = zod.z.codec(require_model_bytes.XlsxBytesSchema, require_model_bytes.PdfBytesSchema, {
31
+ decode: (xlsxBytes) => require_convert_convert.xlsxToPdf(xlsxBytes),
32
+ encode: (pdfBytes) => require_convert_convert.pdfToXlsx(pdfBytes)
33
+ });
30
34
  const odtDocxCodec = zod.z.codec(require_model_bytes.OdtBytesSchema, require_model_bytes.DocxBytesSchema, {
31
35
  decode: (odtBytes) => require_convert_convert.odtToDocx(odtBytes),
32
36
  encode: (docxBytes) => require_convert_convert.docxToOdt(docxBytes)
@@ -49,3 +53,4 @@ exports.odsXlsxCodec = odsXlsxCodec;
49
53
  exports.odtDocxCodec = odtDocxCodec;
50
54
  exports.odtPdfCodec = odtPdfCodec;
51
55
  exports.pptxPdfCodec = pptxPdfCodec;
56
+ exports.xlsxPdfCodec = xlsxPdfCodec;
@@ -6,8 +6,9 @@ declare const odtPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8
6
6
  declare const odpPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7
7
  declare const odsPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
8
8
  declare const odgPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
9
+ declare const xlsxPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
9
10
  declare const odtDocxCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
10
11
  declare const odpPptxCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
11
12
  declare const odsXlsxCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
12
13
  //#endregion
13
- export { docxPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec };
14
+ export { docxPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, xlsxPdfCodec };
@@ -6,8 +6,9 @@ declare const odtPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8
6
6
  declare const odpPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
7
7
  declare const odsPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
8
8
  declare const odgPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
9
+ declare const xlsxPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
9
10
  declare const odtDocxCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
10
11
  declare const odpPptxCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
11
12
  declare const odsXlsxCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
12
13
  //#endregion
13
- export { docxPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec };
14
+ export { docxPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, xlsxPdfCodec };
@@ -1,5 +1,5 @@
1
1
  import { DocxBytesSchema, OdgBytesSchema, OdpBytesSchema, OdsBytesSchema, OdtBytesSchema, PdfBytesSchema, PptxBytesSchema, XlsxBytesSchema } from "../model/bytes.js";
2
- import { docxToOdt, docxToPdf, odgToPdf, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToPdf, pdfToDocx, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pptxToOdp, pptxToPdf, xlsxToOds } from "./convert.js";
2
+ import { docxToOdt, docxToPdf, odgToPdf, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToPdf, pdfToDocx, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToOdp, pptxToPdf, xlsxToOds, xlsxToPdf } from "./convert.js";
3
3
  import { z } from "zod";
4
4
  //#region src/convert/codec.ts
5
5
  const docxPdfCodec = z.codec(DocxBytesSchema, PdfBytesSchema, {
@@ -26,6 +26,10 @@ const odgPdfCodec = z.codec(OdgBytesSchema, PdfBytesSchema, {
26
26
  decode: (odgBytes) => odgToPdf(odgBytes),
27
27
  encode: (pdfBytes) => pdfToOdg(pdfBytes)
28
28
  });
29
+ const xlsxPdfCodec = z.codec(XlsxBytesSchema, PdfBytesSchema, {
30
+ decode: (xlsxBytes) => xlsxToPdf(xlsxBytes),
31
+ encode: (pdfBytes) => pdfToXlsx(pdfBytes)
32
+ });
29
33
  const odtDocxCodec = z.codec(OdtBytesSchema, DocxBytesSchema, {
30
34
  decode: (odtBytes) => odtToDocx(odtBytes),
31
35
  encode: (docxBytes) => docxToOdt(docxBytes)
@@ -39,4 +43,4 @@ const odsXlsxCodec = z.codec(OdsBytesSchema, XlsxBytesSchema, {
39
43
  encode: (xlsxBytes) => xlsxToOds(xlsxBytes)
40
44
  });
41
45
  //#endregion
42
- export { docxPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec };
46
+ export { docxPdfCodec, odgPdfCodec, odpPdfCodec, odpPptxCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, xlsxPdfCodec };