documents.js 1.97.11 → 1.98.1
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/dist/capability-DX0lCSiI.d.ts +16 -0
- package/dist/capability-an5gSNsu.d.cts +16 -0
- package/dist/convert/capability.cjs +65 -5
- package/dist/convert/capability.d.cts +2 -38
- package/dist/convert/capability.d.ts +2 -38
- package/dist/convert/capability.js +64 -2
- package/dist/convert/codec.cjs +29 -29
- package/dist/convert/codec.js +1 -1
- package/dist/convert/composition.cjs +414 -4
- package/dist/convert/composition.d.cts +2 -2
- package/dist/convert/composition.d.ts +1 -1
- package/dist/convert/composition.js +411 -1
- package/dist/convert/convert.cjs +350 -42
- package/dist/convert/convert.d.cts +105 -1
- package/dist/convert/convert.d.ts +105 -1
- package/dist/convert/convert.js +309 -1
- package/dist/convert/local.cjs +23 -8
- package/dist/convert/local.js +20 -5
- package/dist/fonts/registry.d.cts +19 -1
- package/dist/fonts/registry.d.ts +19 -1
- package/dist/hsqldb/binary-script.d.cts +1 -1
- package/dist/hsqldb/binary-script.d.ts +1 -1
- package/dist/hsqldb/cache.d.cts +1 -1
- package/dist/hsqldb/cache.d.ts +1 -1
- package/dist/hsqldb/rowformat.d.cts +24 -1
- package/dist/hsqldb/rowformat.d.ts +24 -1
- package/dist/index.cjs +44 -41
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +6 -5
- package/dist/index.js +3 -2
- package/dist/metadata/read.cjs +2 -2
- package/dist/metadata/read.js +1 -1
- package/dist/odb/read.d.cts +1 -1
- package/dist/odb/read.d.ts +1 -1
- package/dist/odb/report/content.d.cts +1 -1
- package/dist/odb/report/content.d.ts +1 -1
- package/dist/odb/report/source.d.cts +1 -1
- package/dist/odb/report/source.d.ts +1 -1
- package/package.json +1 -1
- package/dist/convert-B1izrvnQ.d.cts +0 -106
- package/dist/convert-BO_4tCwz.cjs +0 -1262
- package/dist/convert-HYsWA-LI.d.ts +0 -106
- package/dist/convert-ULGgwmSb.js +0 -975
- package/dist/registry-DpF4A9EM.d.ts +0 -20
- package/dist/registry-ZAWlWHqJ.d.cts +0 -20
- package/dist/rowformat-Cl2exlEh.d.cts +0 -25
- package/dist/rowformat-Cl2exlEh.d.ts +0 -25
package/dist/convert/convert.cjs
CHANGED
|
@@ -1,43 +1,351 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
2
|
+
const require_model_geometry = require("../model/geometry.cjs");
|
|
3
|
+
const require_model_metadata = require("../model/metadata.cjs");
|
|
4
|
+
const require_edit_docx_content = require("../edit/docx/content.cjs");
|
|
5
|
+
const require_edit_odt_content = require("../edit/odt/content.cjs");
|
|
6
|
+
const require_fonts_registry = require("../fonts/registry.cjs");
|
|
7
|
+
const require_mathml_layout = require("../mathml/layout.cjs");
|
|
8
|
+
const require_odf_formula_read = require("../odf/formula/read.cjs");
|
|
9
|
+
const require_odf_odt_read = require("../odf/odt/read.cjs");
|
|
10
|
+
const require_layout_engine = require("../layout/engine.cjs");
|
|
11
|
+
const require_ports_abort = require("../ports/abort.cjs");
|
|
12
|
+
const require_odb_csv = require("../odb/csv.cjs");
|
|
13
|
+
const require_odb_read = require("../odb/read.cjs");
|
|
14
|
+
const require_odb_spreadsheet = require("../odb/spreadsheet.cjs");
|
|
15
|
+
const require_convert_composition = require("./composition.cjs");
|
|
16
|
+
let ooxml_js = require("ooxml.js");
|
|
17
|
+
let document_schema_js = require("document-schema.js");
|
|
18
|
+
let odf_js = require("odf.js");
|
|
19
|
+
let pdf_codec = require("pdf-codec");
|
|
20
|
+
//#region src/convert/convert.ts
|
|
21
|
+
const mathMetricsAt = (sizePt) => (0, pdf_codec.loadMathFont)().metricsAt(sizePt);
|
|
22
|
+
function docxToPdf(bytes, options) {
|
|
23
|
+
return require_convert_composition.convertDocument("docx", "pdf", bytes, options);
|
|
24
|
+
}
|
|
25
|
+
function odtToPdf(bytes, options) {
|
|
26
|
+
return require_convert_composition.convertDocument("odt", "pdf", bytes, options);
|
|
27
|
+
}
|
|
28
|
+
function pptxToPdf(bytes, options) {
|
|
29
|
+
return require_convert_composition.convertDocument("pptx", "pdf", bytes, options);
|
|
30
|
+
}
|
|
31
|
+
function odpToPdf(bytes, options) {
|
|
32
|
+
return require_convert_composition.convertDocument("odp", "pdf", bytes, options);
|
|
33
|
+
}
|
|
34
|
+
function odsToPdf(bytes, options) {
|
|
35
|
+
return require_convert_composition.convertDocument("ods", "pdf", bytes, options);
|
|
36
|
+
}
|
|
37
|
+
function odgToPdf(bytes, options) {
|
|
38
|
+
return require_convert_composition.convertDocument("odg", "pdf", bytes, options);
|
|
39
|
+
}
|
|
40
|
+
function markdownToPdf(bytes, options) {
|
|
41
|
+
return require_convert_composition.convertDocument("markdown", "pdf", bytes, options);
|
|
42
|
+
}
|
|
43
|
+
const STANDALONE_FORMULA_SIZE_PT = 18;
|
|
44
|
+
const STANDALONE_FORMULA_MARGIN_PT = 72;
|
|
45
|
+
function odfToPdf(bytes, options) {
|
|
46
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
47
|
+
const pkg = (0, odf_js.decodePackage)(bytes);
|
|
48
|
+
const read = require_odf_formula_read.readOdfFormulaContent(pkg);
|
|
49
|
+
if (read.kind !== "formula") throw new Error("readOdfFormulaContent returned a non-formula ContentDocument");
|
|
50
|
+
const content = {
|
|
51
|
+
...read,
|
|
52
|
+
metadata: require_model_metadata.resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
53
|
+
};
|
|
54
|
+
const metrics = (0, pdf_codec.loadMathFont)().metricsAt(STANDALONE_FORMULA_SIZE_PT);
|
|
55
|
+
const { box } = require_mathml_layout.layoutFormula(content.formula.mathml, {
|
|
56
|
+
metrics,
|
|
57
|
+
sizePt: STANDALONE_FORMULA_SIZE_PT,
|
|
58
|
+
color: document_schema_js.COLOR_BLACK
|
|
59
|
+
});
|
|
60
|
+
const flipped = require_model_geometry.flipY({
|
|
61
|
+
xPt: STANDALONE_FORMULA_MARGIN_PT,
|
|
62
|
+
yPt: STANDALONE_FORMULA_MARGIN_PT,
|
|
63
|
+
widthPt: box.widthPt,
|
|
64
|
+
heightPt: box.heightPt
|
|
65
|
+
}, document_schema_js.PAGE_SIZE_A4.heightPt);
|
|
66
|
+
const layout = {
|
|
67
|
+
formatVersion: document_schema_js.LAYOUT_FORMAT_VERSION,
|
|
68
|
+
metadata: content.metadata,
|
|
69
|
+
pages: [{
|
|
70
|
+
widthPt: document_schema_js.PAGE_SIZE_A4.widthPt,
|
|
71
|
+
heightPt: document_schema_js.PAGE_SIZE_A4.heightPt,
|
|
72
|
+
items: []
|
|
73
|
+
}],
|
|
74
|
+
images: {}
|
|
75
|
+
};
|
|
76
|
+
options?.onDocument?.({
|
|
77
|
+
formatVersion: document_schema_js.DOCUMENT_PACKAGE_FORMAT_VERSION,
|
|
78
|
+
content,
|
|
79
|
+
layout
|
|
80
|
+
});
|
|
81
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
82
|
+
return (0, pdf_codec.writePdf)(layout, {
|
|
83
|
+
signal: options?.signal,
|
|
84
|
+
formulas: [{
|
|
85
|
+
pageIndex: 0,
|
|
86
|
+
xPt: flipped.xPt,
|
|
87
|
+
yPt: flipped.yPt,
|
|
88
|
+
box
|
|
89
|
+
}]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function pdfToDocx(bytes, options) {
|
|
93
|
+
return require_convert_composition.convertDocument("pdf", "docx", bytes, options);
|
|
94
|
+
}
|
|
95
|
+
function pdfToPptx(bytes, options) {
|
|
96
|
+
return require_convert_composition.convertDocument("pdf", "pptx", bytes, options);
|
|
97
|
+
}
|
|
98
|
+
function pdfToOdt(bytes, options) {
|
|
99
|
+
return require_convert_composition.convertDocument("pdf", "odt", bytes, options);
|
|
100
|
+
}
|
|
101
|
+
function pdfToOdp(bytes, options) {
|
|
102
|
+
return require_convert_composition.convertDocument("pdf", "odp", bytes, options);
|
|
103
|
+
}
|
|
104
|
+
function pdfToOdg(bytes, options) {
|
|
105
|
+
return require_convert_composition.convertDocument("pdf", "odg", bytes, options);
|
|
106
|
+
}
|
|
107
|
+
function pdfToOds(bytes, options) {
|
|
108
|
+
return require_convert_composition.convertDocument("pdf", "ods", bytes, options);
|
|
109
|
+
}
|
|
110
|
+
function pdfToMarkdown(bytes, options) {
|
|
111
|
+
return require_convert_composition.convertDocument("pdf", "markdown", bytes, options);
|
|
112
|
+
}
|
|
113
|
+
function odtToDocx(bytes, options) {
|
|
114
|
+
return require_convert_composition.convertDocument("odt", "docx", bytes, options);
|
|
115
|
+
}
|
|
116
|
+
function docxToOdt(bytes, options) {
|
|
117
|
+
return require_convert_composition.convertDocument("docx", "odt", bytes, options);
|
|
118
|
+
}
|
|
119
|
+
function odpToPptx(bytes, options) {
|
|
120
|
+
return require_convert_composition.convertDocument("odp", "pptx", bytes, options);
|
|
121
|
+
}
|
|
122
|
+
function pptxToOdp(bytes, options) {
|
|
123
|
+
return require_convert_composition.convertDocument("pptx", "odp", bytes, options);
|
|
124
|
+
}
|
|
125
|
+
function odsToXlsx(bytes, options) {
|
|
126
|
+
return require_convert_composition.convertDocument("ods", "xlsx", bytes, options);
|
|
127
|
+
}
|
|
128
|
+
function xlsxToOds(bytes, options) {
|
|
129
|
+
return require_convert_composition.convertDocument("xlsx", "ods", bytes, options);
|
|
130
|
+
}
|
|
131
|
+
function markdownToDocx(bytes, options) {
|
|
132
|
+
return require_convert_composition.convertDocument("markdown", "docx", bytes, options);
|
|
133
|
+
}
|
|
134
|
+
function docxToMarkdown(bytes, options) {
|
|
135
|
+
return require_convert_composition.convertDocument("docx", "markdown", bytes, options);
|
|
136
|
+
}
|
|
137
|
+
function markdownToOdt(bytes, options) {
|
|
138
|
+
return require_convert_composition.convertDocument("markdown", "odt", bytes, options);
|
|
139
|
+
}
|
|
140
|
+
function odtToMarkdown(bytes, options) {
|
|
141
|
+
return require_convert_composition.convertDocument("odt", "markdown", bytes, options);
|
|
142
|
+
}
|
|
143
|
+
function docxToPptx(bytes, options) {
|
|
144
|
+
return require_convert_composition.convertDocument("docx", "pptx", bytes, options);
|
|
145
|
+
}
|
|
146
|
+
function pptxToDocx(bytes, options) {
|
|
147
|
+
return require_convert_composition.convertDocument("pptx", "docx", bytes, options);
|
|
148
|
+
}
|
|
149
|
+
function odtToOdp(bytes, options) {
|
|
150
|
+
return require_convert_composition.convertDocument("odt", "odp", bytes, options);
|
|
151
|
+
}
|
|
152
|
+
function odpToOdt(bytes, options) {
|
|
153
|
+
return require_convert_composition.convertDocument("odp", "odt", bytes, options);
|
|
154
|
+
}
|
|
155
|
+
function xlsxToPdf(bytes, options) {
|
|
156
|
+
return require_convert_composition.convertDocument("xlsx", "pdf", bytes, options);
|
|
157
|
+
}
|
|
158
|
+
function pdfToXlsx(bytes, options) {
|
|
159
|
+
return require_convert_composition.convertDocument("pdf", "xlsx", bytes, options);
|
|
160
|
+
}
|
|
161
|
+
function xlsxToMarkdown(bytes, options) {
|
|
162
|
+
return require_convert_composition.convertDocument("xlsx", "markdown", bytes, options);
|
|
163
|
+
}
|
|
164
|
+
function markdownToXlsx(bytes, options) {
|
|
165
|
+
return require_convert_composition.convertDocument("markdown", "xlsx", bytes, options);
|
|
166
|
+
}
|
|
167
|
+
var OdmUnresolvedSectionError = class extends Error {
|
|
168
|
+
hrefs;
|
|
169
|
+
constructor(hrefs) {
|
|
170
|
+
super(`odmToPdf: ${hrefs.length} chapter section(s) could not be resolved -- no inline content and no resolveSubDocument result for: ${hrefs.join(", ")}`);
|
|
171
|
+
this.name = "OdmUnresolvedSectionError";
|
|
172
|
+
this.hrefs = hrefs;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const INLINE_SECTION_MARGIN_PT = 56.69291338582677;
|
|
176
|
+
const INLINE_SECTION_MARGINS = {
|
|
177
|
+
topPt: INLINE_SECTION_MARGIN_PT,
|
|
178
|
+
rightPt: INLINE_SECTION_MARGIN_PT,
|
|
179
|
+
bottomPt: INLINE_SECTION_MARGIN_PT,
|
|
180
|
+
leftPt: INLINE_SECTION_MARGIN_PT
|
|
181
|
+
};
|
|
182
|
+
function inlineOdmSectionToContentSection(section, pkg) {
|
|
183
|
+
const blocks = [];
|
|
184
|
+
for (const node of section.inlineContent ?? []) {
|
|
185
|
+
if (node.type !== "element") continue;
|
|
186
|
+
if (node.tag === "text:p" || node.tag === "text:h") blocks.push((0, odf_js.readOdfParagraph)(node, pkg));
|
|
187
|
+
else if (node.tag === "table:table") blocks.push((0, odf_js.readOdfTable)(node, pkg));
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
pageSize: document_schema_js.PAGE_SIZE_A4,
|
|
191
|
+
margins: INLINE_SECTION_MARGINS,
|
|
192
|
+
blocks
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function withLeadingChapterBreak(section) {
|
|
196
|
+
const pageBreak = { kind: "pageBreak" };
|
|
197
|
+
return {
|
|
198
|
+
...section,
|
|
199
|
+
blocks: [pageBreak, ...section.blocks]
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function odmToPdf(bytes, options) {
|
|
203
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
204
|
+
const pkg = (0, odf_js.decodePackage)(bytes);
|
|
205
|
+
const odm = (0, odf_js.readOdm)(pkg);
|
|
206
|
+
const unresolvedHrefs = [];
|
|
207
|
+
const chapterSections = [];
|
|
208
|
+
const sourceFonts = require_fonts_registry.extractSourceFonts({
|
|
209
|
+
kind: "odf",
|
|
210
|
+
package: pkg
|
|
211
|
+
});
|
|
212
|
+
for (const section of odm.sections) {
|
|
213
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
214
|
+
if (section.inlineContent !== void 0) {
|
|
215
|
+
chapterSections.push([inlineOdmSectionToContentSection(section, pkg)]);
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
const chapterBytes = options?.resolveSubDocument?.(section.href);
|
|
219
|
+
if (chapterBytes === void 0) {
|
|
220
|
+
unresolvedHrefs.push(section.href);
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
const chapterPkg = (0, odf_js.decodePackage)(chapterBytes);
|
|
224
|
+
sourceFonts.push(...require_fonts_registry.extractSourceFonts({
|
|
225
|
+
kind: "odf",
|
|
226
|
+
package: chapterPkg
|
|
227
|
+
}));
|
|
228
|
+
const chapterContent = require_odf_odt_read.readOdtContent(chapterPkg);
|
|
229
|
+
if (chapterContent.kind !== "wordprocessing") throw new Error("readOdtContent returned a non-wordprocessing ContentDocument");
|
|
230
|
+
chapterSections.push(chapterContent.sections);
|
|
231
|
+
}
|
|
232
|
+
if (unresolvedHrefs.length > 0) throw new OdmUnresolvedSectionError(unresolvedHrefs);
|
|
233
|
+
const combinedSections = [];
|
|
234
|
+
chapterSections.forEach((sections, chapterIndex) => {
|
|
235
|
+
if (chapterIndex === 0) {
|
|
236
|
+
combinedSections.push(...sections);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
combinedSections.push(...sections.map((section, sectionIndex) => sectionIndex === 0 ? withLeadingChapterBreak(section) : section));
|
|
240
|
+
});
|
|
241
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
242
|
+
const content = {
|
|
243
|
+
kind: "wordprocessing",
|
|
244
|
+
formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
|
|
245
|
+
metadata: require_model_metadata.resolveMetadataTimestamps((0, odf_js.readOdfMetadata)(pkg), options?.clock),
|
|
246
|
+
sections: combinedSections
|
|
247
|
+
};
|
|
248
|
+
const fonts = (0, pdf_codec.createFontRegistry)({
|
|
249
|
+
sourceFonts,
|
|
250
|
+
fonts: options?.fonts,
|
|
251
|
+
onSubstitution: options?.onFontSubstitution
|
|
252
|
+
});
|
|
253
|
+
const { document: layout, formulas } = require_layout_engine.convertWordprocessingToLayout(content, {
|
|
254
|
+
measurer: (0, pdf_codec.createFontMeasurer)(fonts),
|
|
255
|
+
mathMetricsAt
|
|
256
|
+
});
|
|
257
|
+
return (0, pdf_codec.writePdf)(layout, {
|
|
258
|
+
signal: options?.signal,
|
|
259
|
+
onSubstitution: options?.onSubstitution,
|
|
260
|
+
formulas,
|
|
261
|
+
fonts
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
function odbToXlsx(bytes, options) {
|
|
265
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
266
|
+
const pkg = (0, odf_js.decodePackage)(bytes);
|
|
267
|
+
const tables = require_odb_read.readOdbTables(pkg, { timeZone: options?.timeZone });
|
|
268
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
269
|
+
const content = require_odb_spreadsheet.odbTablesToSpreadsheetDocument(tables);
|
|
270
|
+
return (0, ooxml_js.encodePackage)((0, ooxml_js.buildXlsxPackage)(content));
|
|
271
|
+
}
|
|
272
|
+
function odbToCsv(bytes, options) {
|
|
273
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
274
|
+
const pkg = (0, odf_js.decodePackage)(bytes);
|
|
275
|
+
const tables = require_odb_read.readOdbTables(pkg, { timeZone: options?.timeZone });
|
|
276
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
277
|
+
return require_odb_csv.buildOdbTableCsv(tables, options?.table);
|
|
278
|
+
}
|
|
279
|
+
function odbReportToDocx(content, options) {
|
|
280
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
281
|
+
return (0, ooxml_js.encodePackage)(require_edit_docx_content.buildDocxPackage(content, { onMathDiagnostic: options?.onMathDiagnostic }));
|
|
282
|
+
}
|
|
283
|
+
function odbReportToOdt(content, options) {
|
|
284
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
285
|
+
return (0, odf_js.encodePackage)(require_edit_odt_content.buildOdtPackage(content));
|
|
286
|
+
}
|
|
287
|
+
function odbReportToPdf(content, options) {
|
|
288
|
+
require_ports_abort.throwIfAborted(options?.signal);
|
|
289
|
+
if (content.kind !== "wordprocessing") throw new Error("odbReportToPdf requires a wordprocessing ContentDocument");
|
|
290
|
+
const fonts = (0, pdf_codec.createFontRegistry)({
|
|
291
|
+
fonts: options?.fonts,
|
|
292
|
+
onSubstitution: options?.onFontSubstitution
|
|
293
|
+
});
|
|
294
|
+
const { document: layout, formulas } = require_layout_engine.convertWordprocessingToLayout(content, {
|
|
295
|
+
measurer: (0, pdf_codec.createFontMeasurer)(fonts),
|
|
296
|
+
mathMetricsAt
|
|
297
|
+
});
|
|
298
|
+
options?.onDocument?.({
|
|
299
|
+
formatVersion: document_schema_js.DOCUMENT_PACKAGE_FORMAT_VERSION,
|
|
300
|
+
content,
|
|
301
|
+
layout
|
|
302
|
+
});
|
|
303
|
+
return (0, pdf_codec.writePdf)(layout, {
|
|
304
|
+
signal: options?.signal,
|
|
305
|
+
onSubstitution: options?.onSubstitution,
|
|
306
|
+
formulas,
|
|
307
|
+
fonts
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
//#endregion
|
|
311
|
+
exports.OdmUnresolvedSectionError = OdmUnresolvedSectionError;
|
|
312
|
+
exports.docxToMarkdown = docxToMarkdown;
|
|
313
|
+
exports.docxToOdt = docxToOdt;
|
|
314
|
+
exports.docxToPdf = docxToPdf;
|
|
315
|
+
exports.docxToPptx = docxToPptx;
|
|
316
|
+
exports.inlineOdmSectionToContentSection = inlineOdmSectionToContentSection;
|
|
317
|
+
exports.markdownToDocx = markdownToDocx;
|
|
318
|
+
exports.markdownToOdt = markdownToOdt;
|
|
319
|
+
exports.markdownToPdf = markdownToPdf;
|
|
320
|
+
exports.markdownToXlsx = markdownToXlsx;
|
|
321
|
+
exports.odbReportToDocx = odbReportToDocx;
|
|
322
|
+
exports.odbReportToOdt = odbReportToOdt;
|
|
323
|
+
exports.odbReportToPdf = odbReportToPdf;
|
|
324
|
+
exports.odbToCsv = odbToCsv;
|
|
325
|
+
exports.odbToXlsx = odbToXlsx;
|
|
326
|
+
exports.odfToPdf = odfToPdf;
|
|
327
|
+
exports.odgToPdf = odgToPdf;
|
|
328
|
+
exports.odmToPdf = odmToPdf;
|
|
329
|
+
exports.odpToOdt = odpToOdt;
|
|
330
|
+
exports.odpToPdf = odpToPdf;
|
|
331
|
+
exports.odpToPptx = odpToPptx;
|
|
332
|
+
exports.odsToPdf = odsToPdf;
|
|
333
|
+
exports.odsToXlsx = odsToXlsx;
|
|
334
|
+
exports.odtToDocx = odtToDocx;
|
|
335
|
+
exports.odtToMarkdown = odtToMarkdown;
|
|
336
|
+
exports.odtToOdp = odtToOdp;
|
|
337
|
+
exports.odtToPdf = odtToPdf;
|
|
338
|
+
exports.pdfToDocx = pdfToDocx;
|
|
339
|
+
exports.pdfToMarkdown = pdfToMarkdown;
|
|
340
|
+
exports.pdfToOdg = pdfToOdg;
|
|
341
|
+
exports.pdfToOdp = pdfToOdp;
|
|
342
|
+
exports.pdfToOds = pdfToOds;
|
|
343
|
+
exports.pdfToOdt = pdfToOdt;
|
|
344
|
+
exports.pdfToPptx = pdfToPptx;
|
|
345
|
+
exports.pdfToXlsx = pdfToXlsx;
|
|
346
|
+
exports.pptxToDocx = pptxToDocx;
|
|
347
|
+
exports.pptxToOdp = pptxToOdp;
|
|
348
|
+
exports.pptxToPdf = pptxToPdf;
|
|
349
|
+
exports.xlsxToMarkdown = xlsxToMarkdown;
|
|
350
|
+
exports.xlsxToOds = xlsxToOds;
|
|
351
|
+
exports.xlsxToPdf = xlsxToPdf;
|
|
@@ -1,2 +1,106 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as ClockPort } from "../clock-C7SUuYN0.cjs";
|
|
2
|
+
import { t as OmmlDiagnostic } from "../shared-DLZ3IQUl.cjs";
|
|
3
|
+
import { HsqldbDecodeOptions } from "../hsqldb/rowformat.cjs";
|
|
4
|
+
import { DocumentFontRegistryOptions } from "../fonts/registry.cjs";
|
|
5
|
+
import { ContentDocument, ContentSection, DocumentPackage } from "document-schema.js";
|
|
6
|
+
import { MarkdownImageResolver } from "markdown-codec";
|
|
7
|
+
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
8
|
+
import { OdmSection, Package } from "odf.js";
|
|
9
|
+
//#region src/convert/convert.d.ts
|
|
10
|
+
interface DocumentToPdfOptions extends DocumentFontRegistryOptions {
|
|
11
|
+
readonly signal?: AbortSignal;
|
|
12
|
+
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
13
|
+
readonly pageIndex: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
16
|
+
readonly onMathDiagnostic?: (diagnostic: OmmlDiagnostic, context: {
|
|
17
|
+
readonly sourcePath?: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
readonly images?: MarkdownImageResolver;
|
|
20
|
+
readonly clock?: ClockPort;
|
|
21
|
+
}
|
|
22
|
+
declare function docxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
23
|
+
declare function odtToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
24
|
+
declare function pptxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
25
|
+
declare function odpToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
26
|
+
declare function odsToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
27
|
+
declare function odgToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
28
|
+
declare function markdownToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
29
|
+
declare function odfToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
30
|
+
interface PdfToDocumentOptions {
|
|
31
|
+
readonly signal?: AbortSignal;
|
|
32
|
+
readonly sink?: PdfDiagnosticSink;
|
|
33
|
+
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
34
|
+
}
|
|
35
|
+
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
36
|
+
declare function pdfToPptx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
37
|
+
declare function pdfToOdt(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
38
|
+
declare function pdfToOdp(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
39
|
+
declare function pdfToOdg(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
40
|
+
declare function pdfToOds(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
41
|
+
declare function pdfToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
42
|
+
interface DocumentBridgeOptions {
|
|
43
|
+
readonly signal?: AbortSignal;
|
|
44
|
+
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
45
|
+
readonly onMathDiagnostic?: (diagnostic: OmmlDiagnostic, context: {
|
|
46
|
+
readonly sourcePath?: string;
|
|
47
|
+
}) => void;
|
|
48
|
+
readonly images?: MarkdownImageResolver;
|
|
49
|
+
}
|
|
50
|
+
interface ComposedDocumentOptions extends DocumentFontRegistryOptions {
|
|
51
|
+
readonly signal?: AbortSignal;
|
|
52
|
+
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
53
|
+
readonly pageIndex: number;
|
|
54
|
+
}) => void;
|
|
55
|
+
readonly clock?: ClockPort;
|
|
56
|
+
readonly images?: MarkdownImageResolver;
|
|
57
|
+
readonly sink?: PdfDiagnosticSink;
|
|
58
|
+
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
59
|
+
}
|
|
60
|
+
declare function odtToDocx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
61
|
+
declare function docxToOdt(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
62
|
+
declare function odpToPptx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
63
|
+
declare function pptxToOdp(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
64
|
+
declare function odsToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
65
|
+
declare function xlsxToOds(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
66
|
+
declare function markdownToDocx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
67
|
+
declare function docxToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
68
|
+
declare function markdownToOdt(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
69
|
+
declare function odtToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
70
|
+
declare function docxToPptx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
71
|
+
declare function pptxToDocx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
72
|
+
declare function odtToOdp(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
73
|
+
declare function odpToOdt(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
74
|
+
declare function xlsxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
75
|
+
declare function pdfToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
76
|
+
declare function xlsxToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: ComposedDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
77
|
+
declare function markdownToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: ComposedDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
78
|
+
interface OdmToPdfOptions extends DocumentToPdfOptions {
|
|
79
|
+
readonly resolveSubDocument?: (href: string) => Uint8Array<ArrayBuffer> | undefined;
|
|
80
|
+
}
|
|
81
|
+
declare class OdmUnresolvedSectionError extends Error {
|
|
82
|
+
readonly hrefs: readonly string[];
|
|
83
|
+
constructor(hrefs: readonly string[]);
|
|
84
|
+
}
|
|
85
|
+
declare function inlineOdmSectionToContentSection(section: OdmSection, pkg: Package): ContentSection;
|
|
86
|
+
declare function odmToPdf(bytes: Uint8Array<ArrayBuffer>, options?: OdmToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
87
|
+
interface OdbConversionOptions extends DocumentBridgeOptions, HsqldbDecodeOptions {}
|
|
88
|
+
declare function odbToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: OdbConversionOptions): Uint8Array<ArrayBuffer>;
|
|
89
|
+
interface OdbToCsvOptions extends OdbConversionOptions {
|
|
90
|
+
readonly table?: string;
|
|
91
|
+
}
|
|
92
|
+
declare function odbToCsv(bytes: Uint8Array<ArrayBuffer>, options?: OdbToCsvOptions): Uint8Array<ArrayBuffer>;
|
|
93
|
+
interface OdbReportToDocxOptions {
|
|
94
|
+
readonly signal?: AbortSignal;
|
|
95
|
+
readonly onMathDiagnostic?: (diagnostic: OmmlDiagnostic, context: {
|
|
96
|
+
readonly sourcePath?: string;
|
|
97
|
+
}) => void;
|
|
98
|
+
}
|
|
99
|
+
declare function odbReportToDocx(content: ContentDocument, options?: OdbReportToDocxOptions): Uint8Array<ArrayBuffer>;
|
|
100
|
+
interface OdbReportToOdtOptions {
|
|
101
|
+
readonly signal?: AbortSignal;
|
|
102
|
+
}
|
|
103
|
+
declare function odbReportToOdt(content: ContentDocument, options?: OdbReportToOdtOptions): Uint8Array<ArrayBuffer>;
|
|
104
|
+
declare function odbReportToPdf(content: ContentDocument, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
105
|
+
//#endregion
|
|
2
106
|
export { ComposedDocumentOptions, DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbReportToDocxOptions, OdbReportToOdtOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError, PdfToDocumentOptions, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, inlineOdmSectionToContentSection, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odmToPdf, odpToOdt, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToDocx, pptxToOdp, pptxToPdf, xlsxToMarkdown, xlsxToOds, xlsxToPdf };
|
|
@@ -1,2 +1,106 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as ClockPort } from "../clock-C7SUuYN0.js";
|
|
2
|
+
import { t as OmmlDiagnostic } from "../shared-DUOzjwcL.js";
|
|
3
|
+
import { HsqldbDecodeOptions } from "../hsqldb/rowformat.js";
|
|
4
|
+
import { DocumentFontRegistryOptions } from "../fonts/registry.js";
|
|
5
|
+
import { ContentDocument, ContentSection, DocumentPackage } from "document-schema.js";
|
|
6
|
+
import { OdmSection, Package } from "odf.js";
|
|
7
|
+
import { MarkdownImageResolver } from "markdown-codec";
|
|
8
|
+
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
9
|
+
//#region src/convert/convert.d.ts
|
|
10
|
+
interface DocumentToPdfOptions extends DocumentFontRegistryOptions {
|
|
11
|
+
readonly signal?: AbortSignal;
|
|
12
|
+
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
13
|
+
readonly pageIndex: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
16
|
+
readonly onMathDiagnostic?: (diagnostic: OmmlDiagnostic, context: {
|
|
17
|
+
readonly sourcePath?: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
readonly images?: MarkdownImageResolver;
|
|
20
|
+
readonly clock?: ClockPort;
|
|
21
|
+
}
|
|
22
|
+
declare function docxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
23
|
+
declare function odtToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
24
|
+
declare function pptxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
25
|
+
declare function odpToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
26
|
+
declare function odsToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
27
|
+
declare function odgToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
28
|
+
declare function markdownToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
29
|
+
declare function odfToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
30
|
+
interface PdfToDocumentOptions {
|
|
31
|
+
readonly signal?: AbortSignal;
|
|
32
|
+
readonly sink?: PdfDiagnosticSink;
|
|
33
|
+
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
34
|
+
}
|
|
35
|
+
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
36
|
+
declare function pdfToPptx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
37
|
+
declare function pdfToOdt(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
38
|
+
declare function pdfToOdp(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
39
|
+
declare function pdfToOdg(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
40
|
+
declare function pdfToOds(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
41
|
+
declare function pdfToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
42
|
+
interface DocumentBridgeOptions {
|
|
43
|
+
readonly signal?: AbortSignal;
|
|
44
|
+
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
45
|
+
readonly onMathDiagnostic?: (diagnostic: OmmlDiagnostic, context: {
|
|
46
|
+
readonly sourcePath?: string;
|
|
47
|
+
}) => void;
|
|
48
|
+
readonly images?: MarkdownImageResolver;
|
|
49
|
+
}
|
|
50
|
+
interface ComposedDocumentOptions extends DocumentFontRegistryOptions {
|
|
51
|
+
readonly signal?: AbortSignal;
|
|
52
|
+
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
53
|
+
readonly pageIndex: number;
|
|
54
|
+
}) => void;
|
|
55
|
+
readonly clock?: ClockPort;
|
|
56
|
+
readonly images?: MarkdownImageResolver;
|
|
57
|
+
readonly sink?: PdfDiagnosticSink;
|
|
58
|
+
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
59
|
+
}
|
|
60
|
+
declare function odtToDocx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
61
|
+
declare function docxToOdt(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
62
|
+
declare function odpToPptx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
63
|
+
declare function pptxToOdp(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
64
|
+
declare function odsToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
65
|
+
declare function xlsxToOds(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
66
|
+
declare function markdownToDocx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
67
|
+
declare function docxToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
68
|
+
declare function markdownToOdt(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
69
|
+
declare function odtToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
70
|
+
declare function docxToPptx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
71
|
+
declare function pptxToDocx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
72
|
+
declare function odtToOdp(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
73
|
+
declare function odpToOdt(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
74
|
+
declare function xlsxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
75
|
+
declare function pdfToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
76
|
+
declare function xlsxToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: ComposedDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
77
|
+
declare function markdownToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: ComposedDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
78
|
+
interface OdmToPdfOptions extends DocumentToPdfOptions {
|
|
79
|
+
readonly resolveSubDocument?: (href: string) => Uint8Array<ArrayBuffer> | undefined;
|
|
80
|
+
}
|
|
81
|
+
declare class OdmUnresolvedSectionError extends Error {
|
|
82
|
+
readonly hrefs: readonly string[];
|
|
83
|
+
constructor(hrefs: readonly string[]);
|
|
84
|
+
}
|
|
85
|
+
declare function inlineOdmSectionToContentSection(section: OdmSection, pkg: Package): ContentSection;
|
|
86
|
+
declare function odmToPdf(bytes: Uint8Array<ArrayBuffer>, options?: OdmToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
87
|
+
interface OdbConversionOptions extends DocumentBridgeOptions, HsqldbDecodeOptions {}
|
|
88
|
+
declare function odbToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: OdbConversionOptions): Uint8Array<ArrayBuffer>;
|
|
89
|
+
interface OdbToCsvOptions extends OdbConversionOptions {
|
|
90
|
+
readonly table?: string;
|
|
91
|
+
}
|
|
92
|
+
declare function odbToCsv(bytes: Uint8Array<ArrayBuffer>, options?: OdbToCsvOptions): Uint8Array<ArrayBuffer>;
|
|
93
|
+
interface OdbReportToDocxOptions {
|
|
94
|
+
readonly signal?: AbortSignal;
|
|
95
|
+
readonly onMathDiagnostic?: (diagnostic: OmmlDiagnostic, context: {
|
|
96
|
+
readonly sourcePath?: string;
|
|
97
|
+
}) => void;
|
|
98
|
+
}
|
|
99
|
+
declare function odbReportToDocx(content: ContentDocument, options?: OdbReportToDocxOptions): Uint8Array<ArrayBuffer>;
|
|
100
|
+
interface OdbReportToOdtOptions {
|
|
101
|
+
readonly signal?: AbortSignal;
|
|
102
|
+
}
|
|
103
|
+
declare function odbReportToOdt(content: ContentDocument, options?: OdbReportToOdtOptions): Uint8Array<ArrayBuffer>;
|
|
104
|
+
declare function odbReportToPdf(content: ContentDocument, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
105
|
+
//#endregion
|
|
2
106
|
export { ComposedDocumentOptions, DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbReportToDocxOptions, OdbReportToOdtOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError, PdfToDocumentOptions, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, inlineOdmSectionToContentSection, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odmToPdf, odpToOdt, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToDocx, pptxToOdp, pptxToPdf, xlsxToMarkdown, xlsxToOds, xlsxToPdf };
|