documents.js 1.53.2 → 1.54.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 +25 -31
- package/dist/index.cjs +86 -5861
- package/dist/index.d.cts +11 -259
- package/dist/index.d.ts +11 -259
- package/dist/index.js +27 -5837
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -2,6 +2,7 @@ import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, Comm
|
|
|
2
2
|
import { Alignment, Box, Box as Box$1, COLOR_BLACK, Color, Color as LayoutColor, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValue as ContentCellValue$1, ContentCellValueSchema, ContentDrawPage, ContentDrawPageSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembership as ContentListMembership$1, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPoint as ContentPathPoint$1, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRun as ContentRun$1, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettings as ContentSheetPrintSettings$1, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStroke as ContentStroke$1, ContentStrokeSchema, ContentSubpath, ContentSubpath as ContentSubpath$1, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DocumentPackage, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocument as LayoutDocument$1, LayoutEllipse, LayoutFont, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutMetadata, LayoutMetadata as LayoutMetadata$1, LayoutPage, LayoutPath, LayoutPathSegment, LayoutRect, LayoutSubpath, LayoutText, Margins, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, isContentBlock, rgbHexToColor } from "document-content-model";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { Package as Package$2, XmlElement as XmlElement$2, XmlNode as XmlNode$2 } from "odf.js";
|
|
5
|
+
import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfDiagnosticSink as PdfDiagnosticSink$1, PdfEncryptedError, PdfParseError, PositionedFormula, PositionedFormula as PositionedFormula$1, ReadPdfOptions, TextMeasurer, WinAnsiSubstitution, WinAnsiSubstitution as WinAnsiSubstitution$1, WritePdfOptions, loadMathFont, pdfCodec, readPdf, writePdf } from "pdf-codec";
|
|
5
6
|
//#region src/model/content.d.ts
|
|
6
7
|
declare const CONTENT_FORMAT_VERSION = 1;
|
|
7
8
|
declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -965,31 +966,6 @@ declare function createOdg(): OdgEditor;
|
|
|
965
966
|
//#region src/edit/odg/content.d.ts
|
|
966
967
|
declare function buildOdgPackage(content: ContentDocument): Package$2;
|
|
967
968
|
//#endregion
|
|
968
|
-
//#region src/pdf/diagnostics.d.ts
|
|
969
|
-
type PdfDiagnosticSeverity = 'info' | 'warning';
|
|
970
|
-
interface PdfDiagnostic {
|
|
971
|
-
readonly code: string;
|
|
972
|
-
readonly severity: PdfDiagnosticSeverity;
|
|
973
|
-
readonly message: string;
|
|
974
|
-
readonly pageIndex?: number;
|
|
975
|
-
}
|
|
976
|
-
type PdfDiagnosticSink = (diagnostic: PdfDiagnostic) => void;
|
|
977
|
-
declare const NOOP_DIAGNOSTIC_SINK: PdfDiagnosticSink;
|
|
978
|
-
declare class PdfParseError extends Error {
|
|
979
|
-
readonly code: string;
|
|
980
|
-
constructor(code: string, message: string);
|
|
981
|
-
}
|
|
982
|
-
declare class PdfEncryptedError extends PdfParseError {
|
|
983
|
-
constructor(message?: string);
|
|
984
|
-
}
|
|
985
|
-
//#endregion
|
|
986
|
-
//#region src/pdf/read.d.ts
|
|
987
|
-
interface ReadPdfOptions {
|
|
988
|
-
readonly sink?: PdfDiagnosticSink;
|
|
989
|
-
readonly signal?: AbortSignal;
|
|
990
|
-
}
|
|
991
|
-
declare function readPdf(bytes: Uint8Array<ArrayBuffer>, options?: ReadPdfOptions): LayoutDocument$1;
|
|
992
|
-
//#endregion
|
|
993
969
|
//#region src/mathml/layout-types.d.ts
|
|
994
970
|
interface MathColor {
|
|
995
971
|
readonly r: number;
|
|
@@ -1133,228 +1109,18 @@ interface OperatorProperties {
|
|
|
1133
1109
|
}
|
|
1134
1110
|
declare function operatorProperties(text: string): OperatorProperties;
|
|
1135
1111
|
//#endregion
|
|
1136
|
-
//#region src/model/formula.d.ts
|
|
1137
|
-
interface EmbeddedFormula {
|
|
1138
|
-
readonly mathml: readonly MathMlNode[];
|
|
1139
|
-
readonly starMath: string | undefined;
|
|
1140
|
-
}
|
|
1141
|
-
interface PositionedFormula {
|
|
1142
|
-
readonly pageIndex: number;
|
|
1143
|
-
readonly xPt: number;
|
|
1144
|
-
readonly yPt: number;
|
|
1145
|
-
readonly box: MathBox;
|
|
1146
|
-
}
|
|
1147
|
-
//#endregion
|
|
1148
|
-
//#region src/pdf/winansi.d.ts
|
|
1149
|
-
interface WinAnsiSubstitution {
|
|
1150
|
-
readonly from: string;
|
|
1151
|
-
readonly to: string;
|
|
1152
|
-
}
|
|
1153
|
-
//#endregion
|
|
1154
|
-
//#region src/pdf/write.d.ts
|
|
1155
|
-
interface WritePdfOptions {
|
|
1156
|
-
readonly compress?: boolean;
|
|
1157
|
-
readonly signal?: AbortSignal;
|
|
1158
|
-
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
1159
|
-
readonly pageIndex: number;
|
|
1160
|
-
}) => void;
|
|
1161
|
-
readonly formulas?: readonly PositionedFormula[];
|
|
1162
|
-
}
|
|
1163
|
-
declare function writePdf(doc: LayoutDocument$1, options?: WritePdfOptions): Uint8Array<ArrayBuffer>;
|
|
1164
|
-
//#endregion
|
|
1165
|
-
//#region src/pdf/codec.d.ts
|
|
1166
|
-
declare const pdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
|
|
1167
|
-
formatVersion: z.ZodLiteral<1>;
|
|
1168
|
-
metadata: z.ZodObject<{
|
|
1169
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1170
|
-
author: z.ZodOptional<z.ZodString>;
|
|
1171
|
-
subject: z.ZodOptional<z.ZodString>;
|
|
1172
|
-
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1173
|
-
creator: z.ZodOptional<z.ZodString>;
|
|
1174
|
-
producer: z.ZodOptional<z.ZodString>;
|
|
1175
|
-
createdIso: z.ZodOptional<z.ZodString>;
|
|
1176
|
-
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
1177
|
-
}, z.core.$strip>;
|
|
1178
|
-
pages: z.ZodArray<z.ZodObject<{
|
|
1179
|
-
widthPt: z.ZodNumber;
|
|
1180
|
-
heightPt: z.ZodNumber;
|
|
1181
|
-
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1182
|
-
kind: z.ZodLiteral<"text">;
|
|
1183
|
-
text: z.ZodString;
|
|
1184
|
-
xPt: z.ZodNumber;
|
|
1185
|
-
yPt: z.ZodNumber;
|
|
1186
|
-
font: z.ZodObject<{
|
|
1187
|
-
family: z.ZodString;
|
|
1188
|
-
weight: z.ZodEnum<{
|
|
1189
|
-
normal: "normal";
|
|
1190
|
-
bold: "bold";
|
|
1191
|
-
}>;
|
|
1192
|
-
style: z.ZodEnum<{
|
|
1193
|
-
normal: "normal";
|
|
1194
|
-
italic: "italic";
|
|
1195
|
-
}>;
|
|
1196
|
-
}, z.core.$strip>;
|
|
1197
|
-
sizePt: z.ZodNumber;
|
|
1198
|
-
color: z.ZodObject<{
|
|
1199
|
-
r: z.ZodNumber;
|
|
1200
|
-
g: z.ZodNumber;
|
|
1201
|
-
b: z.ZodNumber;
|
|
1202
|
-
}, z.core.$strip>;
|
|
1203
|
-
widthPt: z.ZodOptional<z.ZodNumber>;
|
|
1204
|
-
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
1205
|
-
underline: z.ZodOptional<z.ZodBoolean>;
|
|
1206
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1207
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1208
|
-
kind: z.ZodLiteral<"image">;
|
|
1209
|
-
imageId: z.ZodString;
|
|
1210
|
-
xPt: z.ZodNumber;
|
|
1211
|
-
yPt: z.ZodNumber;
|
|
1212
|
-
widthPt: z.ZodNumber;
|
|
1213
|
-
heightPt: z.ZodNumber;
|
|
1214
|
-
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
1215
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1216
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1217
|
-
kind: z.ZodLiteral<"rect">;
|
|
1218
|
-
xPt: z.ZodNumber;
|
|
1219
|
-
yPt: z.ZodNumber;
|
|
1220
|
-
widthPt: z.ZodNumber;
|
|
1221
|
-
heightPt: z.ZodNumber;
|
|
1222
|
-
fill: z.ZodOptional<z.ZodObject<{
|
|
1223
|
-
r: z.ZodNumber;
|
|
1224
|
-
g: z.ZodNumber;
|
|
1225
|
-
b: z.ZodNumber;
|
|
1226
|
-
}, z.core.$strip>>;
|
|
1227
|
-
stroke: z.ZodOptional<z.ZodObject<{
|
|
1228
|
-
color: z.ZodObject<{
|
|
1229
|
-
r: z.ZodNumber;
|
|
1230
|
-
g: z.ZodNumber;
|
|
1231
|
-
b: z.ZodNumber;
|
|
1232
|
-
}, z.core.$strip>;
|
|
1233
|
-
widthPt: z.ZodNumber;
|
|
1234
|
-
}, z.core.$strip>>;
|
|
1235
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1236
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1237
|
-
kind: z.ZodLiteral<"line">;
|
|
1238
|
-
x1Pt: z.ZodNumber;
|
|
1239
|
-
y1Pt: z.ZodNumber;
|
|
1240
|
-
x2Pt: z.ZodNumber;
|
|
1241
|
-
y2Pt: z.ZodNumber;
|
|
1242
|
-
color: z.ZodObject<{
|
|
1243
|
-
r: z.ZodNumber;
|
|
1244
|
-
g: z.ZodNumber;
|
|
1245
|
-
b: z.ZodNumber;
|
|
1246
|
-
}, z.core.$strip>;
|
|
1247
|
-
widthPt: z.ZodNumber;
|
|
1248
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1249
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1250
|
-
kind: z.ZodLiteral<"ellipse">;
|
|
1251
|
-
xPt: z.ZodNumber;
|
|
1252
|
-
yPt: z.ZodNumber;
|
|
1253
|
-
widthPt: z.ZodNumber;
|
|
1254
|
-
heightPt: z.ZodNumber;
|
|
1255
|
-
fill: z.ZodOptional<z.ZodObject<{
|
|
1256
|
-
r: z.ZodNumber;
|
|
1257
|
-
g: z.ZodNumber;
|
|
1258
|
-
b: z.ZodNumber;
|
|
1259
|
-
}, z.core.$strip>>;
|
|
1260
|
-
stroke: z.ZodOptional<z.ZodObject<{
|
|
1261
|
-
color: z.ZodObject<{
|
|
1262
|
-
r: z.ZodNumber;
|
|
1263
|
-
g: z.ZodNumber;
|
|
1264
|
-
b: z.ZodNumber;
|
|
1265
|
-
}, z.core.$strip>;
|
|
1266
|
-
widthPt: z.ZodNumber;
|
|
1267
|
-
}, z.core.$strip>>;
|
|
1268
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1269
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1270
|
-
kind: z.ZodLiteral<"path">;
|
|
1271
|
-
subpaths: z.ZodArray<z.ZodObject<{
|
|
1272
|
-
startXPt: z.ZodNumber;
|
|
1273
|
-
startYPt: z.ZodNumber;
|
|
1274
|
-
segments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1275
|
-
kind: z.ZodLiteral<"line">;
|
|
1276
|
-
xPt: z.ZodNumber;
|
|
1277
|
-
yPt: z.ZodNumber;
|
|
1278
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1279
|
-
kind: z.ZodLiteral<"cubic">;
|
|
1280
|
-
c1xPt: z.ZodNumber;
|
|
1281
|
-
c1yPt: z.ZodNumber;
|
|
1282
|
-
c2xPt: z.ZodNumber;
|
|
1283
|
-
c2yPt: z.ZodNumber;
|
|
1284
|
-
xPt: z.ZodNumber;
|
|
1285
|
-
yPt: z.ZodNumber;
|
|
1286
|
-
}, z.core.$strip>], "kind">>;
|
|
1287
|
-
closed: z.ZodBoolean;
|
|
1288
|
-
}, z.core.$strip>>;
|
|
1289
|
-
fill: z.ZodOptional<z.ZodObject<{
|
|
1290
|
-
r: z.ZodNumber;
|
|
1291
|
-
g: z.ZodNumber;
|
|
1292
|
-
b: z.ZodNumber;
|
|
1293
|
-
}, z.core.$strip>>;
|
|
1294
|
-
fillRule: z.ZodOptional<z.ZodEnum<{
|
|
1295
|
-
nonzero: "nonzero";
|
|
1296
|
-
evenodd: "evenodd";
|
|
1297
|
-
}>>;
|
|
1298
|
-
stroke: z.ZodOptional<z.ZodObject<{
|
|
1299
|
-
color: z.ZodObject<{
|
|
1300
|
-
r: z.ZodNumber;
|
|
1301
|
-
g: z.ZodNumber;
|
|
1302
|
-
b: z.ZodNumber;
|
|
1303
|
-
}, z.core.$strip>;
|
|
1304
|
-
widthPt: z.ZodNumber;
|
|
1305
|
-
}, z.core.$strip>>;
|
|
1306
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1307
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1308
|
-
kind: z.ZodLiteral<"link">;
|
|
1309
|
-
uri: z.ZodString;
|
|
1310
|
-
xPt: z.ZodNumber;
|
|
1311
|
-
yPt: z.ZodNumber;
|
|
1312
|
-
widthPt: z.ZodNumber;
|
|
1313
|
-
heightPt: z.ZodNumber;
|
|
1314
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1315
|
-
}, z.core.$strip>], "kind">>;
|
|
1316
|
-
notes: z.ZodOptional<z.ZodString>;
|
|
1317
|
-
}, z.core.$strip>>;
|
|
1318
|
-
images: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1319
|
-
format: z.ZodEnum<{
|
|
1320
|
-
png: "png";
|
|
1321
|
-
jpeg: "jpeg";
|
|
1322
|
-
}>;
|
|
1323
|
-
base64: z.ZodString;
|
|
1324
|
-
widthPx: z.ZodNumber;
|
|
1325
|
-
heightPx: z.ZodNumber;
|
|
1326
|
-
}, z.core.$strip>>;
|
|
1327
|
-
}, z.core.$strip>>;
|
|
1328
|
-
//#endregion
|
|
1329
|
-
//#region src/pdf/math-font.d.ts
|
|
1330
|
-
interface MathFontDescriptorMetrics {
|
|
1331
|
-
readonly unitsPerEm: number;
|
|
1332
|
-
readonly ascent: number;
|
|
1333
|
-
readonly descent: number;
|
|
1334
|
-
readonly capHeight: number;
|
|
1335
|
-
readonly bboxMin: readonly [number, number];
|
|
1336
|
-
readonly bboxMax: readonly [number, number];
|
|
1337
|
-
readonly italicAngle: number;
|
|
1338
|
-
}
|
|
1339
|
-
interface MathFont {
|
|
1340
|
-
readonly metrics: MathFontMetrics;
|
|
1341
|
-
readonly cffBytes: Uint8Array<ArrayBuffer>;
|
|
1342
|
-
readonly descriptor: MathFontDescriptorMetrics;
|
|
1343
|
-
glyphId(codePoint: number): number | undefined;
|
|
1344
|
-
glyphSpaceWidth(glyphId: number): number;
|
|
1345
|
-
}
|
|
1346
|
-
interface LoadedMathFont {
|
|
1347
|
-
readonly font: MathFont;
|
|
1348
|
-
readonly metricsAt: (sizePt: number) => MathFontMetrics;
|
|
1349
|
-
}
|
|
1350
|
-
declare function loadMathFont(): LoadedMathFont;
|
|
1351
|
-
//#endregion
|
|
1352
1112
|
//#region src/ooxml/docx/read.d.ts
|
|
1353
1113
|
declare function readDocxContent(pkg: Package$1): ContentDocument;
|
|
1354
1114
|
//#endregion
|
|
1355
1115
|
//#region src/ooxml/pptx/read.d.ts
|
|
1356
1116
|
declare function readPptxContent(pkg: Package$1): ContentDocument;
|
|
1357
1117
|
//#endregion
|
|
1118
|
+
//#region src/model/formula.d.ts
|
|
1119
|
+
interface EmbeddedFormula {
|
|
1120
|
+
readonly mathml: readonly MathMlNode[];
|
|
1121
|
+
readonly starMath: string | undefined;
|
|
1122
|
+
}
|
|
1123
|
+
//#endregion
|
|
1358
1124
|
//#region src/odf/odt/read.d.ts
|
|
1359
1125
|
interface OdtContentResult {
|
|
1360
1126
|
readonly document: ContentDocument;
|
|
@@ -1382,20 +1148,6 @@ interface StandaloneFormulaContent extends EmbeddedFormula {
|
|
|
1382
1148
|
declare function readOdfFormulaContent(pkg: Package$2): StandaloneFormulaContent;
|
|
1383
1149
|
declare function readOdfEmbeddedFormula(outerPkg: Package$2, subPackagePath: string): EmbeddedFormula | undefined;
|
|
1384
1150
|
//#endregion
|
|
1385
|
-
//#region src/pdf/measure.d.ts
|
|
1386
|
-
interface UnderlineMetrics {
|
|
1387
|
-
readonly offsetPt: number;
|
|
1388
|
-
readonly thicknessPt: number;
|
|
1389
|
-
}
|
|
1390
|
-
interface TextMeasurer {
|
|
1391
|
-
widthOfTextAtSize(text: string, font: LayoutFont, sizePt: number): number;
|
|
1392
|
-
lineHeightAtSize(font: LayoutFont, sizePt: number): number;
|
|
1393
|
-
ascenderAtSize(font: LayoutFont, sizePt: number): number;
|
|
1394
|
-
descenderAtSize(font: LayoutFont, sizePt: number): number;
|
|
1395
|
-
underlineAtSize(font: LayoutFont, sizePt: number): UnderlineMetrics;
|
|
1396
|
-
horizontalScaleFor(font: LayoutFont): number;
|
|
1397
|
-
}
|
|
1398
|
-
//#endregion
|
|
1399
1151
|
//#region src/layout/engine.d.ts
|
|
1400
1152
|
interface EngineLayoutOptions {
|
|
1401
1153
|
readonly measurer: TextMeasurer;
|
|
@@ -1403,7 +1155,7 @@ interface EngineLayoutOptions {
|
|
|
1403
1155
|
}
|
|
1404
1156
|
interface WordprocessingLayoutResult {
|
|
1405
1157
|
readonly document: LayoutDocument$1;
|
|
1406
|
-
readonly formulas: readonly PositionedFormula[];
|
|
1158
|
+
readonly formulas: readonly PositionedFormula$1[];
|
|
1407
1159
|
}
|
|
1408
1160
|
type WordprocessingContentDocument = Extract<ContentDocument, {
|
|
1409
1161
|
kind: 'wordprocessing';
|
|
@@ -1417,7 +1169,7 @@ interface SlidesLayoutOptions {
|
|
|
1417
1169
|
}
|
|
1418
1170
|
interface PresentationLayoutResult {
|
|
1419
1171
|
readonly document: LayoutDocument$1;
|
|
1420
|
-
readonly formulas: readonly PositionedFormula[];
|
|
1172
|
+
readonly formulas: readonly PositionedFormula$1[];
|
|
1421
1173
|
}
|
|
1422
1174
|
type PresentationContentDocument = Extract<ContentDocument, {
|
|
1423
1175
|
kind: 'presentation';
|
|
@@ -1455,7 +1207,7 @@ declare function reconstructSpreadsheet(doc: LayoutDocument$1, options?: Reconst
|
|
|
1455
1207
|
//#region src/convert/convert.d.ts
|
|
1456
1208
|
interface DocumentToPdfOptions {
|
|
1457
1209
|
readonly signal?: AbortSignal;
|
|
1458
|
-
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
1210
|
+
readonly onSubstitution?: (substitution: WinAnsiSubstitution$1, context: {
|
|
1459
1211
|
readonly pageIndex: number;
|
|
1460
1212
|
}) => void;
|
|
1461
1213
|
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
@@ -1469,7 +1221,7 @@ declare function odgToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPd
|
|
|
1469
1221
|
declare function odfToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
1470
1222
|
interface PdfToDocumentOptions {
|
|
1471
1223
|
readonly signal?: AbortSignal;
|
|
1472
|
-
readonly sink?: PdfDiagnosticSink;
|
|
1224
|
+
readonly sink?: PdfDiagnosticSink$1;
|
|
1473
1225
|
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
1474
1226
|
}
|
|
1475
1227
|
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, Comm
|
|
|
2
2
|
import { Alignment, Box, Box as Box$1, COLOR_BLACK, Color, Color as LayoutColor, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValue as ContentCellValue$1, ContentCellValueSchema, ContentDrawPage, ContentDrawPageSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembership as ContentListMembership$1, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentPathPoint, ContentPathPoint as ContentPathPoint$1, ContentPathPointSchema, ContentPathSegment, ContentPathSegmentSchema, ContentRun, ContentRun as ContentRun$1, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettings as ContentSheetPrintSettings$1, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStroke, ContentStroke as ContentStroke$1, ContentStrokeSchema, ContentSubpath, ContentSubpath as ContentSubpath$1, ContentSubpathSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, ContentVector, ContentVectorSchema, DEFAULT_LAYOUT_FONT, DocumentPackage, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocument as LayoutDocument$1, LayoutEllipse, LayoutFont, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutMetadata, LayoutMetadata as LayoutMetadata$1, LayoutPage, LayoutPath, LayoutPathSegment, LayoutRect, LayoutSubpath, LayoutText, Margins, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, isContentBlock, rgbHexToColor } from "document-content-model";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { Package as Package$2, XmlElement as XmlElement$2, XmlNode as XmlNode$2 } from "odf.js";
|
|
5
|
+
import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, NOOP_DIAGNOSTIC_SINK, PdfDiagnostic, PdfDiagnosticSeverity, PdfDiagnosticSink, PdfDiagnosticSink as PdfDiagnosticSink$1, PdfEncryptedError, PdfParseError, PositionedFormula, PositionedFormula as PositionedFormula$1, ReadPdfOptions, TextMeasurer, WinAnsiSubstitution, WinAnsiSubstitution as WinAnsiSubstitution$1, WritePdfOptions, loadMathFont, pdfCodec, readPdf, writePdf } from "pdf-codec";
|
|
5
6
|
//#region src/model/content.d.ts
|
|
6
7
|
declare const CONTENT_FORMAT_VERSION = 1;
|
|
7
8
|
declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -965,31 +966,6 @@ declare function createOdg(): OdgEditor;
|
|
|
965
966
|
//#region src/edit/odg/content.d.ts
|
|
966
967
|
declare function buildOdgPackage(content: ContentDocument): Package$2;
|
|
967
968
|
//#endregion
|
|
968
|
-
//#region src/pdf/diagnostics.d.ts
|
|
969
|
-
type PdfDiagnosticSeverity = 'info' | 'warning';
|
|
970
|
-
interface PdfDiagnostic {
|
|
971
|
-
readonly code: string;
|
|
972
|
-
readonly severity: PdfDiagnosticSeverity;
|
|
973
|
-
readonly message: string;
|
|
974
|
-
readonly pageIndex?: number;
|
|
975
|
-
}
|
|
976
|
-
type PdfDiagnosticSink = (diagnostic: PdfDiagnostic) => void;
|
|
977
|
-
declare const NOOP_DIAGNOSTIC_SINK: PdfDiagnosticSink;
|
|
978
|
-
declare class PdfParseError extends Error {
|
|
979
|
-
readonly code: string;
|
|
980
|
-
constructor(code: string, message: string);
|
|
981
|
-
}
|
|
982
|
-
declare class PdfEncryptedError extends PdfParseError {
|
|
983
|
-
constructor(message?: string);
|
|
984
|
-
}
|
|
985
|
-
//#endregion
|
|
986
|
-
//#region src/pdf/read.d.ts
|
|
987
|
-
interface ReadPdfOptions {
|
|
988
|
-
readonly sink?: PdfDiagnosticSink;
|
|
989
|
-
readonly signal?: AbortSignal;
|
|
990
|
-
}
|
|
991
|
-
declare function readPdf(bytes: Uint8Array<ArrayBuffer>, options?: ReadPdfOptions): LayoutDocument$1;
|
|
992
|
-
//#endregion
|
|
993
969
|
//#region src/mathml/layout-types.d.ts
|
|
994
970
|
interface MathColor {
|
|
995
971
|
readonly r: number;
|
|
@@ -1133,228 +1109,18 @@ interface OperatorProperties {
|
|
|
1133
1109
|
}
|
|
1134
1110
|
declare function operatorProperties(text: string): OperatorProperties;
|
|
1135
1111
|
//#endregion
|
|
1136
|
-
//#region src/model/formula.d.ts
|
|
1137
|
-
interface EmbeddedFormula {
|
|
1138
|
-
readonly mathml: readonly MathMlNode[];
|
|
1139
|
-
readonly starMath: string | undefined;
|
|
1140
|
-
}
|
|
1141
|
-
interface PositionedFormula {
|
|
1142
|
-
readonly pageIndex: number;
|
|
1143
|
-
readonly xPt: number;
|
|
1144
|
-
readonly yPt: number;
|
|
1145
|
-
readonly box: MathBox;
|
|
1146
|
-
}
|
|
1147
|
-
//#endregion
|
|
1148
|
-
//#region src/pdf/winansi.d.ts
|
|
1149
|
-
interface WinAnsiSubstitution {
|
|
1150
|
-
readonly from: string;
|
|
1151
|
-
readonly to: string;
|
|
1152
|
-
}
|
|
1153
|
-
//#endregion
|
|
1154
|
-
//#region src/pdf/write.d.ts
|
|
1155
|
-
interface WritePdfOptions {
|
|
1156
|
-
readonly compress?: boolean;
|
|
1157
|
-
readonly signal?: AbortSignal;
|
|
1158
|
-
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
1159
|
-
readonly pageIndex: number;
|
|
1160
|
-
}) => void;
|
|
1161
|
-
readonly formulas?: readonly PositionedFormula[];
|
|
1162
|
-
}
|
|
1163
|
-
declare function writePdf(doc: LayoutDocument$1, options?: WritePdfOptions): Uint8Array<ArrayBuffer>;
|
|
1164
|
-
//#endregion
|
|
1165
|
-
//#region src/pdf/codec.d.ts
|
|
1166
|
-
declare const pdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
|
|
1167
|
-
formatVersion: z.ZodLiteral<1>;
|
|
1168
|
-
metadata: z.ZodObject<{
|
|
1169
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1170
|
-
author: z.ZodOptional<z.ZodString>;
|
|
1171
|
-
subject: z.ZodOptional<z.ZodString>;
|
|
1172
|
-
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1173
|
-
creator: z.ZodOptional<z.ZodString>;
|
|
1174
|
-
producer: z.ZodOptional<z.ZodString>;
|
|
1175
|
-
createdIso: z.ZodOptional<z.ZodString>;
|
|
1176
|
-
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
1177
|
-
}, z.core.$strip>;
|
|
1178
|
-
pages: z.ZodArray<z.ZodObject<{
|
|
1179
|
-
widthPt: z.ZodNumber;
|
|
1180
|
-
heightPt: z.ZodNumber;
|
|
1181
|
-
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1182
|
-
kind: z.ZodLiteral<"text">;
|
|
1183
|
-
text: z.ZodString;
|
|
1184
|
-
xPt: z.ZodNumber;
|
|
1185
|
-
yPt: z.ZodNumber;
|
|
1186
|
-
font: z.ZodObject<{
|
|
1187
|
-
family: z.ZodString;
|
|
1188
|
-
weight: z.ZodEnum<{
|
|
1189
|
-
normal: "normal";
|
|
1190
|
-
bold: "bold";
|
|
1191
|
-
}>;
|
|
1192
|
-
style: z.ZodEnum<{
|
|
1193
|
-
normal: "normal";
|
|
1194
|
-
italic: "italic";
|
|
1195
|
-
}>;
|
|
1196
|
-
}, z.core.$strip>;
|
|
1197
|
-
sizePt: z.ZodNumber;
|
|
1198
|
-
color: z.ZodObject<{
|
|
1199
|
-
r: z.ZodNumber;
|
|
1200
|
-
g: z.ZodNumber;
|
|
1201
|
-
b: z.ZodNumber;
|
|
1202
|
-
}, z.core.$strip>;
|
|
1203
|
-
widthPt: z.ZodOptional<z.ZodNumber>;
|
|
1204
|
-
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
1205
|
-
underline: z.ZodOptional<z.ZodBoolean>;
|
|
1206
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1207
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1208
|
-
kind: z.ZodLiteral<"image">;
|
|
1209
|
-
imageId: z.ZodString;
|
|
1210
|
-
xPt: z.ZodNumber;
|
|
1211
|
-
yPt: z.ZodNumber;
|
|
1212
|
-
widthPt: z.ZodNumber;
|
|
1213
|
-
heightPt: z.ZodNumber;
|
|
1214
|
-
rotationDeg: z.ZodOptional<z.ZodNumber>;
|
|
1215
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1216
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1217
|
-
kind: z.ZodLiteral<"rect">;
|
|
1218
|
-
xPt: z.ZodNumber;
|
|
1219
|
-
yPt: z.ZodNumber;
|
|
1220
|
-
widthPt: z.ZodNumber;
|
|
1221
|
-
heightPt: z.ZodNumber;
|
|
1222
|
-
fill: z.ZodOptional<z.ZodObject<{
|
|
1223
|
-
r: z.ZodNumber;
|
|
1224
|
-
g: z.ZodNumber;
|
|
1225
|
-
b: z.ZodNumber;
|
|
1226
|
-
}, z.core.$strip>>;
|
|
1227
|
-
stroke: z.ZodOptional<z.ZodObject<{
|
|
1228
|
-
color: z.ZodObject<{
|
|
1229
|
-
r: z.ZodNumber;
|
|
1230
|
-
g: z.ZodNumber;
|
|
1231
|
-
b: z.ZodNumber;
|
|
1232
|
-
}, z.core.$strip>;
|
|
1233
|
-
widthPt: z.ZodNumber;
|
|
1234
|
-
}, z.core.$strip>>;
|
|
1235
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1236
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1237
|
-
kind: z.ZodLiteral<"line">;
|
|
1238
|
-
x1Pt: z.ZodNumber;
|
|
1239
|
-
y1Pt: z.ZodNumber;
|
|
1240
|
-
x2Pt: z.ZodNumber;
|
|
1241
|
-
y2Pt: z.ZodNumber;
|
|
1242
|
-
color: z.ZodObject<{
|
|
1243
|
-
r: z.ZodNumber;
|
|
1244
|
-
g: z.ZodNumber;
|
|
1245
|
-
b: z.ZodNumber;
|
|
1246
|
-
}, z.core.$strip>;
|
|
1247
|
-
widthPt: z.ZodNumber;
|
|
1248
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1249
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1250
|
-
kind: z.ZodLiteral<"ellipse">;
|
|
1251
|
-
xPt: z.ZodNumber;
|
|
1252
|
-
yPt: z.ZodNumber;
|
|
1253
|
-
widthPt: z.ZodNumber;
|
|
1254
|
-
heightPt: z.ZodNumber;
|
|
1255
|
-
fill: z.ZodOptional<z.ZodObject<{
|
|
1256
|
-
r: z.ZodNumber;
|
|
1257
|
-
g: z.ZodNumber;
|
|
1258
|
-
b: z.ZodNumber;
|
|
1259
|
-
}, z.core.$strip>>;
|
|
1260
|
-
stroke: z.ZodOptional<z.ZodObject<{
|
|
1261
|
-
color: z.ZodObject<{
|
|
1262
|
-
r: z.ZodNumber;
|
|
1263
|
-
g: z.ZodNumber;
|
|
1264
|
-
b: z.ZodNumber;
|
|
1265
|
-
}, z.core.$strip>;
|
|
1266
|
-
widthPt: z.ZodNumber;
|
|
1267
|
-
}, z.core.$strip>>;
|
|
1268
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1269
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1270
|
-
kind: z.ZodLiteral<"path">;
|
|
1271
|
-
subpaths: z.ZodArray<z.ZodObject<{
|
|
1272
|
-
startXPt: z.ZodNumber;
|
|
1273
|
-
startYPt: z.ZodNumber;
|
|
1274
|
-
segments: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1275
|
-
kind: z.ZodLiteral<"line">;
|
|
1276
|
-
xPt: z.ZodNumber;
|
|
1277
|
-
yPt: z.ZodNumber;
|
|
1278
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1279
|
-
kind: z.ZodLiteral<"cubic">;
|
|
1280
|
-
c1xPt: z.ZodNumber;
|
|
1281
|
-
c1yPt: z.ZodNumber;
|
|
1282
|
-
c2xPt: z.ZodNumber;
|
|
1283
|
-
c2yPt: z.ZodNumber;
|
|
1284
|
-
xPt: z.ZodNumber;
|
|
1285
|
-
yPt: z.ZodNumber;
|
|
1286
|
-
}, z.core.$strip>], "kind">>;
|
|
1287
|
-
closed: z.ZodBoolean;
|
|
1288
|
-
}, z.core.$strip>>;
|
|
1289
|
-
fill: z.ZodOptional<z.ZodObject<{
|
|
1290
|
-
r: z.ZodNumber;
|
|
1291
|
-
g: z.ZodNumber;
|
|
1292
|
-
b: z.ZodNumber;
|
|
1293
|
-
}, z.core.$strip>>;
|
|
1294
|
-
fillRule: z.ZodOptional<z.ZodEnum<{
|
|
1295
|
-
nonzero: "nonzero";
|
|
1296
|
-
evenodd: "evenodd";
|
|
1297
|
-
}>>;
|
|
1298
|
-
stroke: z.ZodOptional<z.ZodObject<{
|
|
1299
|
-
color: z.ZodObject<{
|
|
1300
|
-
r: z.ZodNumber;
|
|
1301
|
-
g: z.ZodNumber;
|
|
1302
|
-
b: z.ZodNumber;
|
|
1303
|
-
}, z.core.$strip>;
|
|
1304
|
-
widthPt: z.ZodNumber;
|
|
1305
|
-
}, z.core.$strip>>;
|
|
1306
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1307
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1308
|
-
kind: z.ZodLiteral<"link">;
|
|
1309
|
-
uri: z.ZodString;
|
|
1310
|
-
xPt: z.ZodNumber;
|
|
1311
|
-
yPt: z.ZodNumber;
|
|
1312
|
-
widthPt: z.ZodNumber;
|
|
1313
|
-
heightPt: z.ZodNumber;
|
|
1314
|
-
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1315
|
-
}, z.core.$strip>], "kind">>;
|
|
1316
|
-
notes: z.ZodOptional<z.ZodString>;
|
|
1317
|
-
}, z.core.$strip>>;
|
|
1318
|
-
images: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1319
|
-
format: z.ZodEnum<{
|
|
1320
|
-
png: "png";
|
|
1321
|
-
jpeg: "jpeg";
|
|
1322
|
-
}>;
|
|
1323
|
-
base64: z.ZodString;
|
|
1324
|
-
widthPx: z.ZodNumber;
|
|
1325
|
-
heightPx: z.ZodNumber;
|
|
1326
|
-
}, z.core.$strip>>;
|
|
1327
|
-
}, z.core.$strip>>;
|
|
1328
|
-
//#endregion
|
|
1329
|
-
//#region src/pdf/math-font.d.ts
|
|
1330
|
-
interface MathFontDescriptorMetrics {
|
|
1331
|
-
readonly unitsPerEm: number;
|
|
1332
|
-
readonly ascent: number;
|
|
1333
|
-
readonly descent: number;
|
|
1334
|
-
readonly capHeight: number;
|
|
1335
|
-
readonly bboxMin: readonly [number, number];
|
|
1336
|
-
readonly bboxMax: readonly [number, number];
|
|
1337
|
-
readonly italicAngle: number;
|
|
1338
|
-
}
|
|
1339
|
-
interface MathFont {
|
|
1340
|
-
readonly metrics: MathFontMetrics;
|
|
1341
|
-
readonly cffBytes: Uint8Array<ArrayBuffer>;
|
|
1342
|
-
readonly descriptor: MathFontDescriptorMetrics;
|
|
1343
|
-
glyphId(codePoint: number): number | undefined;
|
|
1344
|
-
glyphSpaceWidth(glyphId: number): number;
|
|
1345
|
-
}
|
|
1346
|
-
interface LoadedMathFont {
|
|
1347
|
-
readonly font: MathFont;
|
|
1348
|
-
readonly metricsAt: (sizePt: number) => MathFontMetrics;
|
|
1349
|
-
}
|
|
1350
|
-
declare function loadMathFont(): LoadedMathFont;
|
|
1351
|
-
//#endregion
|
|
1352
1112
|
//#region src/ooxml/docx/read.d.ts
|
|
1353
1113
|
declare function readDocxContent(pkg: Package$1): ContentDocument;
|
|
1354
1114
|
//#endregion
|
|
1355
1115
|
//#region src/ooxml/pptx/read.d.ts
|
|
1356
1116
|
declare function readPptxContent(pkg: Package$1): ContentDocument;
|
|
1357
1117
|
//#endregion
|
|
1118
|
+
//#region src/model/formula.d.ts
|
|
1119
|
+
interface EmbeddedFormula {
|
|
1120
|
+
readonly mathml: readonly MathMlNode[];
|
|
1121
|
+
readonly starMath: string | undefined;
|
|
1122
|
+
}
|
|
1123
|
+
//#endregion
|
|
1358
1124
|
//#region src/odf/odt/read.d.ts
|
|
1359
1125
|
interface OdtContentResult {
|
|
1360
1126
|
readonly document: ContentDocument;
|
|
@@ -1382,20 +1148,6 @@ interface StandaloneFormulaContent extends EmbeddedFormula {
|
|
|
1382
1148
|
declare function readOdfFormulaContent(pkg: Package$2): StandaloneFormulaContent;
|
|
1383
1149
|
declare function readOdfEmbeddedFormula(outerPkg: Package$2, subPackagePath: string): EmbeddedFormula | undefined;
|
|
1384
1150
|
//#endregion
|
|
1385
|
-
//#region src/pdf/measure.d.ts
|
|
1386
|
-
interface UnderlineMetrics {
|
|
1387
|
-
readonly offsetPt: number;
|
|
1388
|
-
readonly thicknessPt: number;
|
|
1389
|
-
}
|
|
1390
|
-
interface TextMeasurer {
|
|
1391
|
-
widthOfTextAtSize(text: string, font: LayoutFont, sizePt: number): number;
|
|
1392
|
-
lineHeightAtSize(font: LayoutFont, sizePt: number): number;
|
|
1393
|
-
ascenderAtSize(font: LayoutFont, sizePt: number): number;
|
|
1394
|
-
descenderAtSize(font: LayoutFont, sizePt: number): number;
|
|
1395
|
-
underlineAtSize(font: LayoutFont, sizePt: number): UnderlineMetrics;
|
|
1396
|
-
horizontalScaleFor(font: LayoutFont): number;
|
|
1397
|
-
}
|
|
1398
|
-
//#endregion
|
|
1399
1151
|
//#region src/layout/engine.d.ts
|
|
1400
1152
|
interface EngineLayoutOptions {
|
|
1401
1153
|
readonly measurer: TextMeasurer;
|
|
@@ -1403,7 +1155,7 @@ interface EngineLayoutOptions {
|
|
|
1403
1155
|
}
|
|
1404
1156
|
interface WordprocessingLayoutResult {
|
|
1405
1157
|
readonly document: LayoutDocument$1;
|
|
1406
|
-
readonly formulas: readonly PositionedFormula[];
|
|
1158
|
+
readonly formulas: readonly PositionedFormula$1[];
|
|
1407
1159
|
}
|
|
1408
1160
|
type WordprocessingContentDocument = Extract<ContentDocument, {
|
|
1409
1161
|
kind: 'wordprocessing';
|
|
@@ -1417,7 +1169,7 @@ interface SlidesLayoutOptions {
|
|
|
1417
1169
|
}
|
|
1418
1170
|
interface PresentationLayoutResult {
|
|
1419
1171
|
readonly document: LayoutDocument$1;
|
|
1420
|
-
readonly formulas: readonly PositionedFormula[];
|
|
1172
|
+
readonly formulas: readonly PositionedFormula$1[];
|
|
1421
1173
|
}
|
|
1422
1174
|
type PresentationContentDocument = Extract<ContentDocument, {
|
|
1423
1175
|
kind: 'presentation';
|
|
@@ -1455,7 +1207,7 @@ declare function reconstructSpreadsheet(doc: LayoutDocument$1, options?: Reconst
|
|
|
1455
1207
|
//#region src/convert/convert.d.ts
|
|
1456
1208
|
interface DocumentToPdfOptions {
|
|
1457
1209
|
readonly signal?: AbortSignal;
|
|
1458
|
-
readonly onSubstitution?: (substitution: WinAnsiSubstitution, context: {
|
|
1210
|
+
readonly onSubstitution?: (substitution: WinAnsiSubstitution$1, context: {
|
|
1459
1211
|
readonly pageIndex: number;
|
|
1460
1212
|
}) => void;
|
|
1461
1213
|
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
@@ -1469,7 +1221,7 @@ declare function odgToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPd
|
|
|
1469
1221
|
declare function odfToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
1470
1222
|
interface PdfToDocumentOptions {
|
|
1471
1223
|
readonly signal?: AbortSignal;
|
|
1472
|
-
readonly sink?: PdfDiagnosticSink;
|
|
1224
|
+
readonly sink?: PdfDiagnosticSink$1;
|
|
1473
1225
|
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
1474
1226
|
}
|
|
1475
1227
|
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|