documents.js 4.0.26 → 4.1.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 +10 -2
- package/dist/cell-typing-CEWlywIc.d.cts +22 -0
- package/dist/cell-typing-CEWlywIc.d.ts +22 -0
- package/dist/convert/codec.cjs +11 -10
- package/dist/convert/codec.js +2 -1
- package/dist/convert/composition-to-pdf.cjs +133 -0
- package/dist/convert/composition-to-pdf.d.cts +7 -0
- package/dist/convert/composition-to-pdf.d.ts +7 -0
- package/dist/convert/composition-to-pdf.js +131 -0
- package/dist/convert/composition.cjs +26 -127
- package/dist/convert/composition.d.cts +14 -4
- package/dist/convert/composition.d.ts +14 -4
- package/dist/convert/composition.js +20 -126
- package/dist/convert/convert.cjs +35 -75
- package/dist/convert/convert.d.cts +5 -20
- package/dist/convert/convert.d.ts +5 -20
- package/dist/convert/convert.js +2 -32
- package/dist/convert/from-pdf.cjs +44 -0
- package/dist/convert/from-pdf.d.cts +21 -0
- package/dist/convert/from-pdf.d.ts +21 -0
- package/dist/convert/from-pdf.js +34 -0
- package/dist/convert/local.cjs +2 -1
- package/dist/convert/local.js +2 -1
- package/dist/csv/read.d.cts +1 -1
- package/dist/csv/read.d.ts +1 -1
- package/dist/diagnostics-DVAXKgcf.d.cts +10 -0
- package/dist/diagnostics-DVAXKgcf.d.ts +10 -0
- package/dist/fonts/registry.d.cts +1 -19
- package/dist/fonts/registry.d.ts +1 -19
- 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 +1 -24
- package/dist/hsqldb/rowformat.d.ts +1 -24
- package/dist/index.cjs +13 -11
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +4 -2
- package/dist/layout/cell-typing.d.cts +1 -21
- package/dist/layout/cell-typing.d.ts +1 -21
- package/dist/layout/reconstruct.cjs +4 -3
- package/dist/layout/reconstruct.d.cts +1 -1
- package/dist/layout/reconstruct.d.ts +1 -1
- package/dist/layout/reconstruct.js +2 -1
- package/dist/layout/shared.cjs +2 -2
- package/dist/layout/shared.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/dist/registry-BcBT-bnX.d.cts +20 -0
- package/dist/registry-D1Pu5XxB.d.ts +20 -0
- package/dist/rowformat-Cl2exlEh.d.cts +25 -0
- package/dist/rowformat-Cl2exlEh.d.ts +25 -0
- package/dist/svg/diagnostics.d.cts +1 -9
- package/dist/svg/diagnostics.d.ts +1 -9
- package/dist/svg/read.d.cts +1 -1
- package/dist/svg/read.d.ts +1 -1
- package/dist/svg/write.d.cts +1 -1
- package/dist/svg/write.d.ts +1 -1
- package/package.json +18 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as ClockPort } from "../clock-C7SUuYN0.cjs";
|
|
2
2
|
import { DocumentFormat } from "./port.cjs";
|
|
3
3
|
import { t as ContentVariant } from "../capability-an5gSNsu.cjs";
|
|
4
|
-
import { SvgDiagnosticSink } from "../
|
|
5
|
-
import { CellTypeInferenceSink } from "../
|
|
4
|
+
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.cjs";
|
|
5
|
+
import { i as CellTypeInferenceSink } from "../cell-typing-CEWlywIc.cjs";
|
|
6
6
|
import { t as OmmlDiagnostic } from "../shared-DLZ3IQUl.cjs";
|
|
7
7
|
import { ContentDocument, DocumentPackage, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
8
8
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
@@ -51,7 +51,11 @@ interface TextFormatNode {
|
|
|
51
51
|
readonly hasSourcePackage: false;
|
|
52
52
|
}
|
|
53
53
|
type FormatNode = PackageFormatNode | TextFormatNode;
|
|
54
|
+
declare function isTextFormatNode(node: FormatNode): node is TextFormatNode;
|
|
54
55
|
declare const FORMAT_NODES: Readonly<Record<ContentFormat, FormatNode>>;
|
|
56
|
+
declare const LAYOUT_CAPABLE: ReadonlySet<ContentFormat>;
|
|
57
|
+
declare function executeBridge(source: ContentFormat, target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
58
|
+
declare function executeFromPdf(target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
55
59
|
type HopExecutor = 'bridge' | 'toPdf' | 'fromPdf';
|
|
56
60
|
interface CompositionHop {
|
|
57
61
|
readonly executor: HopExecutor;
|
|
@@ -62,6 +66,12 @@ interface ConversionPlan {
|
|
|
62
66
|
readonly hops: readonly CompositionHop[];
|
|
63
67
|
}
|
|
64
68
|
declare function resolveCompositionPlan(source: DocumentFormat, target: DocumentFormat): ConversionPlan | undefined;
|
|
65
|
-
|
|
69
|
+
interface CompositionExecutorBinding {
|
|
70
|
+
readonly bridge: (source: ContentFormat, target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions) => Uint8Array<ArrayBuffer>;
|
|
71
|
+
readonly fromPdf: (target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions) => Uint8Array<ArrayBuffer>;
|
|
72
|
+
readonly toPdf?: (source: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions) => Uint8Array<ArrayBuffer>;
|
|
73
|
+
}
|
|
74
|
+
declare function runCompositionPlan(plan: ConversionPlan, bytes: Uint8Array<ArrayBuffer>, options: UnifiedConversionOptions | undefined, executors: CompositionExecutorBinding): Uint8Array<ArrayBuffer>;
|
|
75
|
+
declare function convertDocumentFromPdf(target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
66
76
|
//#endregion
|
|
67
|
-
export { CompositionHop, ContentFormat, ConversionPlan, FORMAT_NODES, FormatNode, HopExecutor, UnifiedConversionOptions,
|
|
77
|
+
export { CompositionExecutorBinding, CompositionHop, ContentFormat, ConversionPlan, FORMAT_NODES, FormatNode, HopExecutor, LAYOUT_CAPABLE, UnifiedConversionOptions, convertDocumentFromPdf, executeBridge, executeFromPdf, isTextFormatNode, resolveCompositionPlan, runCompositionPlan };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as ClockPort } from "../clock-C7SUuYN0.js";
|
|
2
2
|
import { DocumentFormat } from "./port.js";
|
|
3
3
|
import { t as ContentVariant } from "../capability-DX0lCSiI.js";
|
|
4
|
-
import { SvgDiagnosticSink } from "../
|
|
5
|
-
import { CellTypeInferenceSink } from "../
|
|
4
|
+
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.js";
|
|
5
|
+
import { i as CellTypeInferenceSink } from "../cell-typing-CEWlywIc.js";
|
|
6
6
|
import { t as OmmlDiagnostic } from "../shared-DUOzjwcL.js";
|
|
7
7
|
import { Package } from "ooxml.js";
|
|
8
8
|
import { ContentDocument, DocumentPackage, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
@@ -51,7 +51,11 @@ interface TextFormatNode {
|
|
|
51
51
|
readonly hasSourcePackage: false;
|
|
52
52
|
}
|
|
53
53
|
type FormatNode = PackageFormatNode | TextFormatNode;
|
|
54
|
+
declare function isTextFormatNode(node: FormatNode): node is TextFormatNode;
|
|
54
55
|
declare const FORMAT_NODES: Readonly<Record<ContentFormat, FormatNode>>;
|
|
56
|
+
declare const LAYOUT_CAPABLE: ReadonlySet<ContentFormat>;
|
|
57
|
+
declare function executeBridge(source: ContentFormat, target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
58
|
+
declare function executeFromPdf(target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
55
59
|
type HopExecutor = 'bridge' | 'toPdf' | 'fromPdf';
|
|
56
60
|
interface CompositionHop {
|
|
57
61
|
readonly executor: HopExecutor;
|
|
@@ -62,6 +66,12 @@ interface ConversionPlan {
|
|
|
62
66
|
readonly hops: readonly CompositionHop[];
|
|
63
67
|
}
|
|
64
68
|
declare function resolveCompositionPlan(source: DocumentFormat, target: DocumentFormat): ConversionPlan | undefined;
|
|
65
|
-
|
|
69
|
+
interface CompositionExecutorBinding {
|
|
70
|
+
readonly bridge: (source: ContentFormat, target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions) => Uint8Array<ArrayBuffer>;
|
|
71
|
+
readonly fromPdf: (target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions) => Uint8Array<ArrayBuffer>;
|
|
72
|
+
readonly toPdf?: (source: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions) => Uint8Array<ArrayBuffer>;
|
|
73
|
+
}
|
|
74
|
+
declare function runCompositionPlan(plan: ConversionPlan, bytes: Uint8Array<ArrayBuffer>, options: UnifiedConversionOptions | undefined, executors: CompositionExecutorBinding): Uint8Array<ArrayBuffer>;
|
|
75
|
+
declare function convertDocumentFromPdf(target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
66
76
|
//#endregion
|
|
67
|
-
export { CompositionHop, ContentFormat, ConversionPlan, FORMAT_NODES, FormatNode, HopExecutor, UnifiedConversionOptions,
|
|
77
|
+
export { CompositionExecutorBinding, CompositionHop, ContentFormat, ConversionPlan, FORMAT_NODES, FormatNode, HopExecutor, LAYOUT_CAPABLE, UnifiedConversionOptions, convertDocumentFromPdf, executeBridge, executeFromPdf, isTextFormatNode, resolveCompositionPlan, runCompositionPlan };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { resolveMetadataTimestamps } from "../model/metadata.js";
|
|
2
1
|
import { buildDocxPackage } from "../edit/docx/content.js";
|
|
3
2
|
import { buildPptxPackage } from "../edit/pptx/content.js";
|
|
4
3
|
import { buildOdtPackage } from "../edit/odt/content.js";
|
|
@@ -7,7 +6,6 @@ import { buildOdsPackage } from "../edit/ods/content.js";
|
|
|
7
6
|
import { buildOdgPackage } from "../edit/odg/content.js";
|
|
8
7
|
import { readMarkdownContent as readMarkdownContent$1 } from "../markdown/read.js";
|
|
9
8
|
import { buildMarkdownText } from "../markdown/write.js";
|
|
10
|
-
import { createDocumentFontRegistry } from "../fonts/registry.js";
|
|
11
9
|
import { readDocxContent as readDocxContent$1 } from "../ooxml/docx/read.js";
|
|
12
10
|
import { readPptxContent as readPptxContent$1 } from "../ooxml/pptx/read.js";
|
|
13
11
|
import { readOdtContent as readOdtContent$1 } from "../odf/odt/read.js";
|
|
@@ -21,21 +19,16 @@ import { buildCsvText } from "../csv/write.js";
|
|
|
21
19
|
import { decodeSvgText, encodeSvgText } from "../svg/text.js";
|
|
22
20
|
import { readSvgContent } from "../svg/read.js";
|
|
23
21
|
import { buildSvgText } from "../svg/write.js";
|
|
24
|
-
import { convertWordprocessingToLayout } from "../layout/engine.js";
|
|
25
|
-
import { convertPresentationToLayout } from "../layout/slides.js";
|
|
26
22
|
import { throwIfAborted } from "../ports/abort.js";
|
|
27
|
-
import { convertSpreadsheetToLayout } from "../layout/sheets.js";
|
|
28
|
-
import { convertDrawingToLayout } from "../layout/drawing.js";
|
|
29
23
|
import { reconstructDrawing, reconstructPresentation, reconstructSpreadsheet, reconstructWordprocessing } from "../layout/reconstruct.js";
|
|
30
24
|
import { drawingToPresentation, presentationToDrawing, presentationToWordprocessing, wordprocessingToPresentation } from "./variant-bridges.js";
|
|
31
25
|
import { UnsupportedConversionError } from "./capability.js";
|
|
32
26
|
import { buildXlsxPackageFromContent, decodePackage, encodePackage, readXlsxContent } from "ooxml.js";
|
|
33
27
|
import { assemblePackage } from "document-schema.js";
|
|
34
|
-
import { createFontMeasurer, createFontRegistry, loadMathFont, readPdf, writePdf } from "pdf-codec";
|
|
35
28
|
import { decodePackage as decodePackage$1, encodePackage as encodePackage$1 } from "odf.js";
|
|
36
29
|
import "markdown-codec";
|
|
30
|
+
import { readPdf } from "pdf-codec/read";
|
|
37
31
|
//#region src/convert/composition.ts
|
|
38
|
-
const mathMetricsAt = (sizePt) => loadMathFont().metricsAt(sizePt);
|
|
39
32
|
const CONTENT_FORMATS = [
|
|
40
33
|
"docx",
|
|
41
34
|
"pptx",
|
|
@@ -183,12 +176,6 @@ const TRANSFORMS = {
|
|
|
183
176
|
return presentationToDrawing(doc);
|
|
184
177
|
}
|
|
185
178
|
};
|
|
186
|
-
const LAYOUT_ENGINES = {
|
|
187
|
-
wordprocessing: convertWordprocessingToLayout,
|
|
188
|
-
presentation: convertPresentationToLayout,
|
|
189
|
-
spreadsheet: convertSpreadsheetToLayout,
|
|
190
|
-
drawing: convertDrawingToLayout
|
|
191
|
-
};
|
|
192
179
|
const RECONSTRUCTORS = {
|
|
193
180
|
wordprocessing: reconstructWordprocessing,
|
|
194
181
|
presentation: reconstructPresentation,
|
|
@@ -227,107 +214,6 @@ function executeBridge(source, target, bytes, options) {
|
|
|
227
214
|
options?.onDocument?.(assemblePackage(buildContent));
|
|
228
215
|
return out;
|
|
229
216
|
}
|
|
230
|
-
function executeToPdf(format, bytes, options) {
|
|
231
|
-
if (!LAYOUT_CAPABLE.has(format)) throw new Error(`executeToPdf: '${format}' has no layout engine of its own`);
|
|
232
|
-
const node = FORMAT_NODES[format];
|
|
233
|
-
let content;
|
|
234
|
-
let fonts;
|
|
235
|
-
if (isTextFormatNode(node)) {
|
|
236
|
-
throwIfAborted(options?.signal);
|
|
237
|
-
const text = node.decode(bytes);
|
|
238
|
-
const read = node.read(text, options);
|
|
239
|
-
content = {
|
|
240
|
-
...read,
|
|
241
|
-
metadata: resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
242
|
-
};
|
|
243
|
-
fonts = createFontRegistry({
|
|
244
|
-
fonts: options?.fonts,
|
|
245
|
-
onSubstitution: options?.onFontSubstitution
|
|
246
|
-
});
|
|
247
|
-
} else {
|
|
248
|
-
const pkg = node.decode(bytes);
|
|
249
|
-
const read = node.read(pkg, options);
|
|
250
|
-
content = {
|
|
251
|
-
...read,
|
|
252
|
-
metadata: resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
253
|
-
};
|
|
254
|
-
const fontSource = node.family === "odf" ? {
|
|
255
|
-
kind: "odf",
|
|
256
|
-
package: pkg
|
|
257
|
-
} : format === "pptx" ? {
|
|
258
|
-
kind: "pptx",
|
|
259
|
-
package: pkg
|
|
260
|
-
} : {
|
|
261
|
-
kind: "docx",
|
|
262
|
-
package: pkg
|
|
263
|
-
};
|
|
264
|
-
fonts = createDocumentFontRegistry(fontSource, {
|
|
265
|
-
fonts: options?.fonts,
|
|
266
|
-
onFontSubstitution: options?.onFontSubstitution
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
const measurer = createFontMeasurer(fonts);
|
|
270
|
-
let layout;
|
|
271
|
-
let pages;
|
|
272
|
-
let formulas;
|
|
273
|
-
switch (content.kind) {
|
|
274
|
-
case "wordprocessing": {
|
|
275
|
-
const result = LAYOUT_ENGINES.wordprocessing(content, {
|
|
276
|
-
measurer,
|
|
277
|
-
mathMetricsAt
|
|
278
|
-
});
|
|
279
|
-
layout = result.document;
|
|
280
|
-
pages = result.pages;
|
|
281
|
-
formulas = result.formulas;
|
|
282
|
-
break;
|
|
283
|
-
}
|
|
284
|
-
case "presentation": {
|
|
285
|
-
const result = LAYOUT_ENGINES.presentation(content, {
|
|
286
|
-
measurer,
|
|
287
|
-
mathMetricsAt
|
|
288
|
-
});
|
|
289
|
-
layout = result.document;
|
|
290
|
-
pages = result.pages;
|
|
291
|
-
formulas = result.formulas;
|
|
292
|
-
break;
|
|
293
|
-
}
|
|
294
|
-
case "spreadsheet": {
|
|
295
|
-
const result = LAYOUT_ENGINES.spreadsheet(content, {
|
|
296
|
-
measurer,
|
|
297
|
-
mathMetricsAt,
|
|
298
|
-
signal: options?.signal
|
|
299
|
-
});
|
|
300
|
-
layout = result.document;
|
|
301
|
-
pages = result.pages;
|
|
302
|
-
formulas = result.formulas;
|
|
303
|
-
break;
|
|
304
|
-
}
|
|
305
|
-
case "drawing": {
|
|
306
|
-
const result = LAYOUT_ENGINES.drawing(content, { measurer });
|
|
307
|
-
layout = result.document;
|
|
308
|
-
pages = result.pages;
|
|
309
|
-
break;
|
|
310
|
-
}
|
|
311
|
-
default: throw new Error(`executeToPdf: cannot lay out a '${content.kind}' document`);
|
|
312
|
-
}
|
|
313
|
-
if (formulas === void 0) {
|
|
314
|
-
const out = writePdf(layout, {
|
|
315
|
-
signal: options?.signal,
|
|
316
|
-
onSubstitution: options?.onSubstitution,
|
|
317
|
-
fonts
|
|
318
|
-
});
|
|
319
|
-
options?.onDocument?.(assemblePackage(content, pages));
|
|
320
|
-
return out;
|
|
321
|
-
}
|
|
322
|
-
const out = writePdf(layout, {
|
|
323
|
-
signal: options?.signal,
|
|
324
|
-
onSubstitution: options?.onSubstitution,
|
|
325
|
-
formulas,
|
|
326
|
-
fonts
|
|
327
|
-
});
|
|
328
|
-
options?.onDocument?.(assemblePackage(content, pages));
|
|
329
|
-
return out;
|
|
330
|
-
}
|
|
331
217
|
function executeFromPdf(target, bytes, options) {
|
|
332
218
|
const node = FORMAT_NODES[target];
|
|
333
219
|
const layout = readPdf(bytes, {
|
|
@@ -445,29 +331,37 @@ function resolveCompositionPlan(source, target) {
|
|
|
445
331
|
function isContentFormat(format) {
|
|
446
332
|
return format !== "pdf" && format !== "odf";
|
|
447
333
|
}
|
|
448
|
-
function
|
|
449
|
-
const plan = resolveCompositionPlan(source, target);
|
|
450
|
-
if (plan === void 0) throw new UnsupportedConversionError(source, target);
|
|
334
|
+
function runCompositionPlan(plan, bytes, options, executors) {
|
|
451
335
|
let current = bytes;
|
|
452
336
|
for (let i = 0; i < plan.hops.length; i++) {
|
|
453
337
|
const hop = plan.hops[i];
|
|
454
|
-
if (hop === void 0) throw new Error("
|
|
338
|
+
if (hop === void 0) throw new Error("runCompositionPlan: resolveCompositionPlan returned a malformed hop");
|
|
455
339
|
const hopOptions = i === plan.hops.length - 1 ? options : options === void 0 ? void 0 : {
|
|
456
340
|
...options,
|
|
457
341
|
onDocument: void 0
|
|
458
342
|
};
|
|
459
343
|
if (hop.executor === "toPdf") {
|
|
460
|
-
if (!isContentFormat(hop.from)) throw new Error(`
|
|
461
|
-
|
|
344
|
+
if (!isContentFormat(hop.from)) throw new Error(`runCompositionPlan: toPdf source '${hop.from}' is not a content format`);
|
|
345
|
+
const toPdf = executors.toPdf;
|
|
346
|
+
if (toPdf === void 0) throw new Error(`runCompositionPlan: the plan's ${hop.from} -> ${hop.to} hop needs a toPdf executor, but this binding carries none (the read-only entry cannot render PDFs)`);
|
|
347
|
+
current = toPdf(hop.from, current, hopOptions);
|
|
462
348
|
} else if (hop.executor === "fromPdf") {
|
|
463
|
-
if (!isContentFormat(hop.to)) throw new Error(`
|
|
464
|
-
current =
|
|
349
|
+
if (!isContentFormat(hop.to)) throw new Error(`runCompositionPlan: fromPdf target '${hop.to}' is not a content format`);
|
|
350
|
+
current = executors.fromPdf(hop.to, current, hopOptions);
|
|
465
351
|
} else {
|
|
466
|
-
if (!isContentFormat(hop.from) || !isContentFormat(hop.to)) throw new Error(`
|
|
467
|
-
current =
|
|
352
|
+
if (!isContentFormat(hop.from) || !isContentFormat(hop.to)) throw new Error(`runCompositionPlan: bridge endpoints '${hop.from}' -> '${hop.to}' are not both content formats`);
|
|
353
|
+
current = executors.bridge(hop.from, hop.to, current, hopOptions);
|
|
468
354
|
}
|
|
469
355
|
}
|
|
470
356
|
return current;
|
|
471
357
|
}
|
|
358
|
+
function convertDocumentFromPdf(target, bytes, options) {
|
|
359
|
+
const plan = resolveCompositionPlan("pdf", target);
|
|
360
|
+
if (plan === void 0) throw new UnsupportedConversionError("pdf", target);
|
|
361
|
+
return runCompositionPlan(plan, bytes, options, {
|
|
362
|
+
bridge: executeBridge,
|
|
363
|
+
fromPdf: executeFromPdf
|
|
364
|
+
});
|
|
365
|
+
}
|
|
472
366
|
//#endregion
|
|
473
|
-
export { FORMAT_NODES,
|
|
367
|
+
export { FORMAT_NODES, LAYOUT_CAPABLE, convertDocumentFromPdf, executeBridge, executeFromPdf, isTextFormatNode, resolveCompositionPlan, runCompositionPlan };
|
package/dist/convert/convert.cjs
CHANGED
|
@@ -12,7 +12,7 @@ const require_ports_abort = require("../ports/abort.cjs");
|
|
|
12
12
|
const require_odb_csv = require("../odb/csv.cjs");
|
|
13
13
|
const require_odb_read = require("../odb/read.cjs");
|
|
14
14
|
const require_odb_spreadsheet = require("../odb/spreadsheet.cjs");
|
|
15
|
-
const
|
|
15
|
+
const require_convert_composition_to_pdf = require("./composition-to-pdf.cjs");
|
|
16
16
|
let ooxml_js = require("ooxml.js");
|
|
17
17
|
let document_schema_js = require("document-schema.js");
|
|
18
18
|
let pdf_codec = require("pdf-codec");
|
|
@@ -20,31 +20,31 @@ let odf_js = require("odf.js");
|
|
|
20
20
|
//#region src/convert/convert.ts
|
|
21
21
|
const mathMetricsAt = (sizePt) => (0, pdf_codec.loadMathFont)().metricsAt(sizePt);
|
|
22
22
|
function docxToPdf(bytes, options) {
|
|
23
|
-
return
|
|
23
|
+
return require_convert_composition_to_pdf.convertDocument("docx", "pdf", bytes, options);
|
|
24
24
|
}
|
|
25
25
|
function odtToPdf(bytes, options) {
|
|
26
|
-
return
|
|
26
|
+
return require_convert_composition_to_pdf.convertDocument("odt", "pdf", bytes, options);
|
|
27
27
|
}
|
|
28
28
|
function pptxToPdf(bytes, options) {
|
|
29
|
-
return
|
|
29
|
+
return require_convert_composition_to_pdf.convertDocument("pptx", "pdf", bytes, options);
|
|
30
30
|
}
|
|
31
31
|
function odpToPdf(bytes, options) {
|
|
32
|
-
return
|
|
32
|
+
return require_convert_composition_to_pdf.convertDocument("odp", "pdf", bytes, options);
|
|
33
33
|
}
|
|
34
34
|
function odsToPdf(bytes, options) {
|
|
35
|
-
return
|
|
35
|
+
return require_convert_composition_to_pdf.convertDocument("ods", "pdf", bytes, options);
|
|
36
36
|
}
|
|
37
37
|
function odgToPdf(bytes, options) {
|
|
38
|
-
return
|
|
38
|
+
return require_convert_composition_to_pdf.convertDocument("odg", "pdf", bytes, options);
|
|
39
39
|
}
|
|
40
40
|
function markdownToPdf(bytes, options) {
|
|
41
|
-
return
|
|
41
|
+
return require_convert_composition_to_pdf.convertDocument("markdown", "pdf", bytes, options);
|
|
42
42
|
}
|
|
43
43
|
function csvToPdf(bytes, options) {
|
|
44
|
-
return
|
|
44
|
+
return require_convert_composition_to_pdf.convertDocument("csv", "pdf", bytes, options);
|
|
45
45
|
}
|
|
46
46
|
function svgToPdf(bytes, options) {
|
|
47
|
-
return
|
|
47
|
+
return require_convert_composition_to_pdf.convertDocument("svg", "pdf", bytes, options);
|
|
48
48
|
}
|
|
49
49
|
const STANDALONE_FORMULA_SIZE_PT = 18;
|
|
50
50
|
const STANDALONE_FORMULA_MARGIN_PT = 72;
|
|
@@ -95,110 +95,80 @@ function odfToPdf(bytes, options) {
|
|
|
95
95
|
}]));
|
|
96
96
|
return out;
|
|
97
97
|
}
|
|
98
|
-
function pdfToDocx(bytes, options) {
|
|
99
|
-
return require_convert_composition.convertDocument("pdf", "docx", bytes, options);
|
|
100
|
-
}
|
|
101
|
-
function pdfToPptx(bytes, options) {
|
|
102
|
-
return require_convert_composition.convertDocument("pdf", "pptx", bytes, options);
|
|
103
|
-
}
|
|
104
|
-
function pdfToOdt(bytes, options) {
|
|
105
|
-
return require_convert_composition.convertDocument("pdf", "odt", bytes, options);
|
|
106
|
-
}
|
|
107
|
-
function pdfToOdp(bytes, options) {
|
|
108
|
-
return require_convert_composition.convertDocument("pdf", "odp", bytes, options);
|
|
109
|
-
}
|
|
110
|
-
function pdfToOdg(bytes, options) {
|
|
111
|
-
return require_convert_composition.convertDocument("pdf", "odg", bytes, options);
|
|
112
|
-
}
|
|
113
|
-
function pdfToOds(bytes, options) {
|
|
114
|
-
return require_convert_composition.convertDocument("pdf", "ods", bytes, options);
|
|
115
|
-
}
|
|
116
|
-
function pdfToMarkdown(bytes, options) {
|
|
117
|
-
return require_convert_composition.convertDocument("pdf", "markdown", bytes, options);
|
|
118
|
-
}
|
|
119
|
-
function pdfToCsv(bytes, options) {
|
|
120
|
-
return require_convert_composition.convertDocument("pdf", "csv", bytes, options);
|
|
121
|
-
}
|
|
122
|
-
function pdfToSvg(bytes, options) {
|
|
123
|
-
return require_convert_composition.convertDocument("pdf", "svg", bytes, options);
|
|
124
|
-
}
|
|
125
98
|
function odtToDocx(bytes, options) {
|
|
126
|
-
return
|
|
99
|
+
return require_convert_composition_to_pdf.convertDocument("odt", "docx", bytes, options);
|
|
127
100
|
}
|
|
128
101
|
function docxToOdt(bytes, options) {
|
|
129
|
-
return
|
|
102
|
+
return require_convert_composition_to_pdf.convertDocument("docx", "odt", bytes, options);
|
|
130
103
|
}
|
|
131
104
|
function odpToPptx(bytes, options) {
|
|
132
|
-
return
|
|
105
|
+
return require_convert_composition_to_pdf.convertDocument("odp", "pptx", bytes, options);
|
|
133
106
|
}
|
|
134
107
|
function pptxToOdp(bytes, options) {
|
|
135
|
-
return
|
|
108
|
+
return require_convert_composition_to_pdf.convertDocument("pptx", "odp", bytes, options);
|
|
136
109
|
}
|
|
137
110
|
function odsToXlsx(bytes, options) {
|
|
138
|
-
return
|
|
111
|
+
return require_convert_composition_to_pdf.convertDocument("ods", "xlsx", bytes, options);
|
|
139
112
|
}
|
|
140
113
|
function xlsxToOds(bytes, options) {
|
|
141
|
-
return
|
|
114
|
+
return require_convert_composition_to_pdf.convertDocument("xlsx", "ods", bytes, options);
|
|
142
115
|
}
|
|
143
116
|
function markdownToDocx(bytes, options) {
|
|
144
|
-
return
|
|
117
|
+
return require_convert_composition_to_pdf.convertDocument("markdown", "docx", bytes, options);
|
|
145
118
|
}
|
|
146
119
|
function docxToMarkdown(bytes, options) {
|
|
147
|
-
return
|
|
120
|
+
return require_convert_composition_to_pdf.convertDocument("docx", "markdown", bytes, options);
|
|
148
121
|
}
|
|
149
122
|
function markdownToOdt(bytes, options) {
|
|
150
|
-
return
|
|
123
|
+
return require_convert_composition_to_pdf.convertDocument("markdown", "odt", bytes, options);
|
|
151
124
|
}
|
|
152
125
|
function odtToMarkdown(bytes, options) {
|
|
153
|
-
return
|
|
126
|
+
return require_convert_composition_to_pdf.convertDocument("odt", "markdown", bytes, options);
|
|
154
127
|
}
|
|
155
128
|
function csvToXlsx(bytes, options) {
|
|
156
|
-
return
|
|
129
|
+
return require_convert_composition_to_pdf.convertDocument("csv", "xlsx", bytes, options);
|
|
157
130
|
}
|
|
158
131
|
function xlsxToCsv(bytes, options) {
|
|
159
|
-
return
|
|
132
|
+
return require_convert_composition_to_pdf.convertDocument("xlsx", "csv", bytes, options);
|
|
160
133
|
}
|
|
161
134
|
function csvToOds(bytes, options) {
|
|
162
|
-
return
|
|
135
|
+
return require_convert_composition_to_pdf.convertDocument("csv", "ods", bytes, options);
|
|
163
136
|
}
|
|
164
137
|
function odsToCsv(bytes, options) {
|
|
165
|
-
return
|
|
138
|
+
return require_convert_composition_to_pdf.convertDocument("ods", "csv", bytes, options);
|
|
166
139
|
}
|
|
167
140
|
function svgToOdg(bytes, options) {
|
|
168
|
-
return
|
|
141
|
+
return require_convert_composition_to_pdf.convertDocument("svg", "odg", bytes, options);
|
|
169
142
|
}
|
|
170
143
|
function odgToSvg(bytes, options) {
|
|
171
|
-
return
|
|
144
|
+
return require_convert_composition_to_pdf.convertDocument("odg", "svg", bytes, options);
|
|
172
145
|
}
|
|
173
146
|
function docxToPptx(bytes, options) {
|
|
174
|
-
return
|
|
147
|
+
return require_convert_composition_to_pdf.convertDocument("docx", "pptx", bytes, options);
|
|
175
148
|
}
|
|
176
149
|
function pptxToDocx(bytes, options) {
|
|
177
|
-
return
|
|
150
|
+
return require_convert_composition_to_pdf.convertDocument("pptx", "docx", bytes, options);
|
|
178
151
|
}
|
|
179
152
|
function odtToOdp(bytes, options) {
|
|
180
|
-
return
|
|
153
|
+
return require_convert_composition_to_pdf.convertDocument("odt", "odp", bytes, options);
|
|
181
154
|
}
|
|
182
155
|
function odpToOdt(bytes, options) {
|
|
183
|
-
return
|
|
156
|
+
return require_convert_composition_to_pdf.convertDocument("odp", "odt", bytes, options);
|
|
184
157
|
}
|
|
185
158
|
function xlsxToPdf(bytes, options) {
|
|
186
|
-
return
|
|
187
|
-
}
|
|
188
|
-
function pdfToXlsx(bytes, options) {
|
|
189
|
-
return require_convert_composition.convertDocument("pdf", "xlsx", bytes, options);
|
|
159
|
+
return require_convert_composition_to_pdf.convertDocument("xlsx", "pdf", bytes, options);
|
|
190
160
|
}
|
|
191
161
|
function xlsxToMarkdown(bytes, options) {
|
|
192
|
-
return
|
|
162
|
+
return require_convert_composition_to_pdf.convertDocument("xlsx", "markdown", bytes, options);
|
|
193
163
|
}
|
|
194
164
|
function markdownToXlsx(bytes, options) {
|
|
195
|
-
return
|
|
165
|
+
return require_convert_composition_to_pdf.convertDocument("markdown", "xlsx", bytes, options);
|
|
196
166
|
}
|
|
197
167
|
function csvToMarkdown(bytes, options) {
|
|
198
|
-
return
|
|
168
|
+
return require_convert_composition_to_pdf.convertDocument("csv", "markdown", bytes, options);
|
|
199
169
|
}
|
|
200
170
|
function markdownToCsv(bytes, options) {
|
|
201
|
-
return
|
|
171
|
+
return require_convert_composition_to_pdf.convertDocument("markdown", "csv", bytes, options);
|
|
202
172
|
}
|
|
203
173
|
var OdmUnresolvedSectionError = class extends Error {
|
|
204
174
|
hrefs;
|
|
@@ -378,16 +348,6 @@ exports.odtToDocx = odtToDocx;
|
|
|
378
348
|
exports.odtToMarkdown = odtToMarkdown;
|
|
379
349
|
exports.odtToOdp = odtToOdp;
|
|
380
350
|
exports.odtToPdf = odtToPdf;
|
|
381
|
-
exports.pdfToCsv = pdfToCsv;
|
|
382
|
-
exports.pdfToDocx = pdfToDocx;
|
|
383
|
-
exports.pdfToMarkdown = pdfToMarkdown;
|
|
384
|
-
exports.pdfToOdg = pdfToOdg;
|
|
385
|
-
exports.pdfToOdp = pdfToOdp;
|
|
386
|
-
exports.pdfToOds = pdfToOds;
|
|
387
|
-
exports.pdfToOdt = pdfToOdt;
|
|
388
|
-
exports.pdfToPptx = pdfToPptx;
|
|
389
|
-
exports.pdfToSvg = pdfToSvg;
|
|
390
|
-
exports.pdfToXlsx = pdfToXlsx;
|
|
391
351
|
exports.pptxToDocx = pptxToDocx;
|
|
392
352
|
exports.pptxToOdp = pptxToOdp;
|
|
393
353
|
exports.pptxToPdf = pptxToPdf;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as ClockPort } from "../clock-C7SUuYN0.cjs";
|
|
2
|
-
import { SvgDiagnosticSink } from "../
|
|
3
|
-
import { CellTypeInferenceSink } from "../
|
|
2
|
+
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.cjs";
|
|
3
|
+
import { i as CellTypeInferenceSink } from "../cell-typing-CEWlywIc.cjs";
|
|
4
4
|
import { t as OmmlDiagnostic } from "../shared-DLZ3IQUl.cjs";
|
|
5
|
-
import { HsqldbDecodeOptions } from "../
|
|
6
|
-
import { DocumentFontRegistryOptions } from "../
|
|
5
|
+
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.cjs";
|
|
6
|
+
import { t as DocumentFontRegistryOptions } from "../registry-BcBT-bnX.cjs";
|
|
7
7
|
import { ContentDocument, ContentSection, DocumentPackage } from "document-schema.js";
|
|
8
8
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
9
9
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
@@ -46,20 +46,6 @@ interface SvgWriteOptions {
|
|
|
46
46
|
declare function csvToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions & CsvReadOptions): Uint8Array<ArrayBuffer>;
|
|
47
47
|
declare function svgToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions & SvgReadOptions): Uint8Array<ArrayBuffer>;
|
|
48
48
|
declare function odfToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
49
|
-
interface PdfToDocumentOptions {
|
|
50
|
-
readonly signal?: AbortSignal;
|
|
51
|
-
readonly sink?: PdfDiagnosticSink;
|
|
52
|
-
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
53
|
-
}
|
|
54
|
-
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
55
|
-
declare function pdfToPptx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
56
|
-
declare function pdfToOdt(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
57
|
-
declare function pdfToOdp(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
58
|
-
declare function pdfToOdg(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
59
|
-
declare function pdfToOds(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
60
|
-
declare function pdfToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
61
|
-
declare function pdfToCsv(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions & CsvWriteOptions): Uint8Array<ArrayBuffer>;
|
|
62
|
-
declare function pdfToSvg(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions & SvgWriteOptions): Uint8Array<ArrayBuffer>;
|
|
63
49
|
interface DocumentBridgeOptions {
|
|
64
50
|
readonly signal?: AbortSignal;
|
|
65
51
|
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
@@ -99,7 +85,6 @@ declare function pptxToDocx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBr
|
|
|
99
85
|
declare function odtToOdp(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
100
86
|
declare function odpToOdt(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
101
87
|
declare function xlsxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
102
|
-
declare function pdfToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
103
88
|
declare function xlsxToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: ComposedDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
104
89
|
declare function markdownToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: ComposedDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
105
90
|
declare function csvToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: ComposedDocumentOptions & CsvReadOptions): Uint8Array<ArrayBuffer>;
|
|
@@ -132,4 +117,4 @@ interface OdbReportToOdtOptions {
|
|
|
132
117
|
declare function odbReportToOdt(content: ContentDocument, options?: OdbReportToOdtOptions): Uint8Array<ArrayBuffer>;
|
|
133
118
|
declare function odbReportToPdf(content: ContentDocument, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
134
119
|
//#endregion
|
|
135
|
-
export { ComposedDocumentOptions, CsvReadOptions, CsvWriteOptions, DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbReportToDocxOptions, OdbReportToOdtOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError,
|
|
120
|
+
export { ComposedDocumentOptions, CsvReadOptions, CsvWriteOptions, DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbReportToDocxOptions, OdbReportToOdtOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError, SvgReadOptions, SvgWriteOptions, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, inlineOdmSectionToContentSection, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odgToSvg, odmToPdf, odpToOdt, odpToPdf, odpToPptx, odsToCsv, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, pptxToDocx, pptxToOdp, pptxToPdf, svgToOdg, svgToPdf, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as ClockPort } from "../clock-C7SUuYN0.js";
|
|
2
|
-
import { SvgDiagnosticSink } from "../
|
|
3
|
-
import { CellTypeInferenceSink } from "../
|
|
2
|
+
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.js";
|
|
3
|
+
import { i as CellTypeInferenceSink } from "../cell-typing-CEWlywIc.js";
|
|
4
4
|
import { t as OmmlDiagnostic } from "../shared-DUOzjwcL.js";
|
|
5
|
-
import { HsqldbDecodeOptions } from "../
|
|
6
|
-
import { DocumentFontRegistryOptions } from "../
|
|
5
|
+
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.js";
|
|
6
|
+
import { t as DocumentFontRegistryOptions } from "../registry-D1Pu5XxB.js";
|
|
7
7
|
import { ContentDocument, ContentSection, DocumentPackage } from "document-schema.js";
|
|
8
8
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
9
9
|
import { OdmSection, Package } from "odf.js";
|
|
@@ -46,20 +46,6 @@ interface SvgWriteOptions {
|
|
|
46
46
|
declare function csvToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions & CsvReadOptions): Uint8Array<ArrayBuffer>;
|
|
47
47
|
declare function svgToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions & SvgReadOptions): Uint8Array<ArrayBuffer>;
|
|
48
48
|
declare function odfToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
49
|
-
interface PdfToDocumentOptions {
|
|
50
|
-
readonly signal?: AbortSignal;
|
|
51
|
-
readonly sink?: PdfDiagnosticSink;
|
|
52
|
-
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
53
|
-
}
|
|
54
|
-
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
55
|
-
declare function pdfToPptx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
56
|
-
declare function pdfToOdt(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
57
|
-
declare function pdfToOdp(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
58
|
-
declare function pdfToOdg(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
59
|
-
declare function pdfToOds(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
60
|
-
declare function pdfToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
61
|
-
declare function pdfToCsv(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions & CsvWriteOptions): Uint8Array<ArrayBuffer>;
|
|
62
|
-
declare function pdfToSvg(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions & SvgWriteOptions): Uint8Array<ArrayBuffer>;
|
|
63
49
|
interface DocumentBridgeOptions {
|
|
64
50
|
readonly signal?: AbortSignal;
|
|
65
51
|
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
@@ -99,7 +85,6 @@ declare function pptxToDocx(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBr
|
|
|
99
85
|
declare function odtToOdp(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
100
86
|
declare function odpToOdt(bytes: Uint8Array<ArrayBuffer>, options?: DocumentBridgeOptions): Uint8Array<ArrayBuffer>;
|
|
101
87
|
declare function xlsxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
102
|
-
declare function pdfToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
103
88
|
declare function xlsxToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: ComposedDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
104
89
|
declare function markdownToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: ComposedDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
105
90
|
declare function csvToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: ComposedDocumentOptions & CsvReadOptions): Uint8Array<ArrayBuffer>;
|
|
@@ -132,4 +117,4 @@ interface OdbReportToOdtOptions {
|
|
|
132
117
|
declare function odbReportToOdt(content: ContentDocument, options?: OdbReportToOdtOptions): Uint8Array<ArrayBuffer>;
|
|
133
118
|
declare function odbReportToPdf(content: ContentDocument, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
134
119
|
//#endregion
|
|
135
|
-
export { ComposedDocumentOptions, CsvReadOptions, CsvWriteOptions, DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbReportToDocxOptions, OdbReportToOdtOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError,
|
|
120
|
+
export { ComposedDocumentOptions, CsvReadOptions, CsvWriteOptions, DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbReportToDocxOptions, OdbReportToOdtOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError, SvgReadOptions, SvgWriteOptions, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, inlineOdmSectionToContentSection, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odgToSvg, odmToPdf, odpToOdt, odpToPdf, odpToPptx, odsToCsv, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, pptxToDocx, pptxToOdp, pptxToPdf, svgToOdg, svgToPdf, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf };
|