kordoc 4.22.12 → 4.22.13
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 +5 -4
- package/dist/{-KQIWF7GR.js → -WQIGIQTE.js} +11 -11
- package/dist/{chunk-NFLXHIF7.js → chunk-3FXLQRWO.js} +4 -4
- package/dist/{chunk-45GOHDHP.js → chunk-47NQ362T.js} +2 -2
- package/dist/{chunk-5YGTRWCN.js → chunk-6VNSISFI.js} +46 -11
- package/dist/chunk-6VNSISFI.js.map +1 -0
- package/dist/{chunk-LYZGZMLW.js → chunk-AEDBCPFA.js} +11 -11
- package/dist/{chunk-CLVIG2P5.cjs → chunk-AXKG24PC.cjs} +3 -3
- package/dist/{chunk-CLVIG2P5.cjs.map → chunk-AXKG24PC.cjs.map} +1 -1
- package/dist/{chunk-RDWNQARC.js → chunk-DO3TPBBJ.js} +2 -2
- package/dist/{chunk-L3WMBMDN.js → chunk-DUTPIML6.js} +2 -2
- package/dist/{chunk-HR5OB3PJ.js → chunk-EMEEVTP2.js} +2 -2
- package/dist/{chunk-O7F6PWT4.js → chunk-EQNLV4YH.js} +2 -2
- package/dist/{chunk-52XK5GKO.js → chunk-FKMKZ3CV.js} +2 -2
- package/dist/{chunk-BU7SJLB4.js → chunk-FVHGH6DG.js} +3 -3
- package/dist/{chunk-BTRNHZWT.js → chunk-GBJNTGVV.js} +2 -2
- package/dist/{chunk-GHTV5OON.cjs → chunk-GDLEO7SO.cjs} +23 -23
- package/dist/{chunk-GHTV5OON.cjs.map → chunk-GDLEO7SO.cjs.map} +1 -1
- package/dist/{chunk-KXHVDSXA.cjs → chunk-GZEVDQ7S.cjs} +3 -3
- package/dist/{chunk-KXHVDSXA.cjs.map → chunk-GZEVDQ7S.cjs.map} +1 -1
- package/dist/{chunk-EZIUU32T.cjs → chunk-JOHVSCHT.cjs} +2 -2
- package/dist/{chunk-EZIUU32T.cjs.map → chunk-JOHVSCHT.cjs.map} +1 -1
- package/dist/{chunk-JHWISUYV.js → chunk-KGO5RHY2.js} +2 -2
- package/dist/{chunk-X26KQYRU.cjs → chunk-KMYZ2SBN.cjs} +24 -24
- package/dist/{chunk-X26KQYRU.cjs.map → chunk-KMYZ2SBN.cjs.map} +1 -1
- package/dist/{chunk-P32MSVJI.js → chunk-LKHXRJX2.js} +2 -2
- package/dist/{chunk-S2B4CTQT.js → chunk-M3YLZLHF.js} +3 -3
- package/dist/{chunk-TFYEKMLY.js → chunk-MKRVPDDJ.js} +2 -2
- package/dist/{chunk-X4EYUXOV.js → chunk-PE3PGTLM.js} +2 -2
- package/dist/{chunk-C7E5WHUJ.js → chunk-Q7BAXRRK.js} +3 -3
- package/dist/{chunk-D4QSFRKK.js → chunk-RQII7NRF.js} +2 -2
- package/dist/{chunk-5WOYDR7R.js → chunk-T2BVIFDL.js} +4 -4
- package/dist/{chunk-A7ZUDINW.js → chunk-T4JZ7DGA.js} +2 -2
- package/dist/{chunk-FX6Y3N4K.js → chunk-W5B45M7Z.js} +4 -4
- package/dist/{chunk-RWHOVUUS.js → chunk-YD4TF6JI.js} +2 -2
- package/dist/{chunk-6DIUB4XS.js → chunk-YLCNGVXU.js} +2 -2
- package/dist/{chunk-VVU45ET4.cjs → chunk-ZEVEVTRG.cjs} +6 -6
- package/dist/{chunk-VVU45ET4.cjs.map → chunk-ZEVEVTRG.cjs.map} +1 -1
- package/dist/chunks-FBC25VC6.js +10 -0
- package/dist/cli.js +30 -30
- package/dist/{formula-NG3YI7AK.cjs → formula-DZA6DTBT.cjs} +9 -9
- package/dist/{formula-NG3YI7AK.cjs.map → formula-DZA6DTBT.cjs.map} +1 -1
- package/dist/{formula-2QCZI77K.js → formula-GAW4HYPK.js} +4 -4
- package/dist/{formula-DYNRSHYF.js → formula-Q5O27Q3L.js} +3 -3
- package/dist/{image-ocr-TQB7UVGP.js → image-ocr-SKLXAVIR.js} +9 -9
- package/dist/{image-ocr-7D5KQUCQ.js → image-ocr-WHMF24OA.js} +6 -6
- package/dist/{image-ocr-P7YLKRUT.cjs → image-ocr-YUVG57VO.cjs} +17 -17
- package/dist/{image-ocr-P7YLKRUT.cjs.map → image-ocr-YUVG57VO.cjs.map} +1 -1
- package/dist/index.cjs +364 -329
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +46 -11
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +22 -22
- package/dist/{model-bundle-KSCQNHCC.js → model-bundle-PHYAMJXE.js} +5 -5
- package/dist/{models-FL5TCXCT.js → models-B7DEVMPD.js} +5 -5
- package/dist/{parse-worker-v2-EAGA4B4A.js → parse-worker-v2-C7VA7D6M.js} +12 -12
- package/dist/{parser-I7LDZPKR.js → parser-4L4HI6KN.js} +9 -9
- package/dist/{parser-LJE3SCND.cjs → parser-IBWL5DO6.cjs} +157 -157
- package/dist/{parser-LJE3SCND.cjs.map → parser-IBWL5DO6.cjs.map} +1 -1
- package/dist/{parser-DANL24BN.js → parser-SCRC6YOP.js} +12 -12
- package/dist/{pdf-ocr-MWQTRCXQ.js → pdf-ocr-7JVAWHAF.js} +9 -9
- package/dist/pdf-ocr-BEXABEIP.cjs +31 -0
- package/dist/{pdf-ocr-P6TG2KCD.cjs.map → pdf-ocr-BEXABEIP.cjs.map} +1 -1
- package/dist/{pdf-ocr-C3ZLE47I.js → pdf-ocr-Z62E4OGV.js} +6 -6
- package/dist/{profile-io-Z5I6I6KS.js → profile-io-T4O5ZOSF.js} +3 -3
- package/dist/{rasterize-HTNSO4VK.js → rasterize-2WOVCKGY.js} +3 -3
- package/dist/{redact-doc-C2PNNX47.js → redact-doc-BS5KXZJU.js} +11 -11
- package/dist/{render-AFFWMWKU.js → render-EWFXTGYC.js} +7 -7
- package/dist/seal-B2FGIQ5C.js +10 -0
- package/dist/{setup-GJKNGTRT.js → setup-LRMO3ZKM.js} +3 -3
- package/dist/visual-UZQZUJIA.js +21 -0
- package/dist/{watch-F7W4ZM6Q.js → watch-SOK25KLD.js} +12 -12
- package/package.json +1 -1
- package/dist/chunk-5YGTRWCN.js.map +0 -1
- package/dist/chunks-6V34GQOS.js +0 -10
- package/dist/pdf-ocr-P6TG2KCD.cjs +0 -31
- package/dist/seal-PBREQDNO.js +0 -10
- package/dist/visual-HTE3YLPV.js +0 -21
- /package/dist/{-KQIWF7GR.js.map → -WQIGIQTE.js.map} +0 -0
- /package/dist/{chunk-NFLXHIF7.js.map → chunk-3FXLQRWO.js.map} +0 -0
- /package/dist/{chunk-45GOHDHP.js.map → chunk-47NQ362T.js.map} +0 -0
- /package/dist/{chunk-LYZGZMLW.js.map → chunk-AEDBCPFA.js.map} +0 -0
- /package/dist/{chunk-RDWNQARC.js.map → chunk-DO3TPBBJ.js.map} +0 -0
- /package/dist/{chunk-L3WMBMDN.js.map → chunk-DUTPIML6.js.map} +0 -0
- /package/dist/{chunk-HR5OB3PJ.js.map → chunk-EMEEVTP2.js.map} +0 -0
- /package/dist/{chunk-O7F6PWT4.js.map → chunk-EQNLV4YH.js.map} +0 -0
- /package/dist/{chunk-52XK5GKO.js.map → chunk-FKMKZ3CV.js.map} +0 -0
- /package/dist/{chunk-BU7SJLB4.js.map → chunk-FVHGH6DG.js.map} +0 -0
- /package/dist/{chunk-BTRNHZWT.js.map → chunk-GBJNTGVV.js.map} +0 -0
- /package/dist/{chunk-JHWISUYV.js.map → chunk-KGO5RHY2.js.map} +0 -0
- /package/dist/{chunk-P32MSVJI.js.map → chunk-LKHXRJX2.js.map} +0 -0
- /package/dist/{chunk-S2B4CTQT.js.map → chunk-M3YLZLHF.js.map} +0 -0
- /package/dist/{chunk-TFYEKMLY.js.map → chunk-MKRVPDDJ.js.map} +0 -0
- /package/dist/{chunk-X4EYUXOV.js.map → chunk-PE3PGTLM.js.map} +0 -0
- /package/dist/{chunk-C7E5WHUJ.js.map → chunk-Q7BAXRRK.js.map} +0 -0
- /package/dist/{chunk-D4QSFRKK.js.map → chunk-RQII7NRF.js.map} +0 -0
- /package/dist/{chunk-5WOYDR7R.js.map → chunk-T2BVIFDL.js.map} +0 -0
- /package/dist/{chunk-A7ZUDINW.js.map → chunk-T4JZ7DGA.js.map} +0 -0
- /package/dist/{chunk-FX6Y3N4K.js.map → chunk-W5B45M7Z.js.map} +0 -0
- /package/dist/{chunk-RWHOVUUS.js.map → chunk-YD4TF6JI.js.map} +0 -0
- /package/dist/{chunk-6DIUB4XS.js.map → chunk-YLCNGVXU.js.map} +0 -0
- /package/dist/{chunks-6V34GQOS.js.map → chunks-FBC25VC6.js.map} +0 -0
- /package/dist/{formula-2QCZI77K.js.map → formula-GAW4HYPK.js.map} +0 -0
- /package/dist/{formula-DYNRSHYF.js.map → formula-Q5O27Q3L.js.map} +0 -0
- /package/dist/{image-ocr-TQB7UVGP.js.map → image-ocr-SKLXAVIR.js.map} +0 -0
- /package/dist/{image-ocr-7D5KQUCQ.js.map → image-ocr-WHMF24OA.js.map} +0 -0
- /package/dist/{model-bundle-KSCQNHCC.js.map → model-bundle-PHYAMJXE.js.map} +0 -0
- /package/dist/{models-FL5TCXCT.js.map → models-B7DEVMPD.js.map} +0 -0
- /package/dist/{parse-worker-v2-EAGA4B4A.js.map → parse-worker-v2-C7VA7D6M.js.map} +0 -0
- /package/dist/{parser-I7LDZPKR.js.map → parser-4L4HI6KN.js.map} +0 -0
- /package/dist/{parser-DANL24BN.js.map → parser-SCRC6YOP.js.map} +0 -0
- /package/dist/{pdf-ocr-C3ZLE47I.js.map → pdf-ocr-7JVAWHAF.js.map} +0 -0
- /package/dist/{pdf-ocr-MWQTRCXQ.js.map → pdf-ocr-Z62E4OGV.js.map} +0 -0
- /package/dist/{profile-io-Z5I6I6KS.js.map → profile-io-T4O5ZOSF.js.map} +0 -0
- /package/dist/{rasterize-HTNSO4VK.js.map → rasterize-2WOVCKGY.js.map} +0 -0
- /package/dist/{redact-doc-C2PNNX47.js.map → redact-doc-BS5KXZJU.js.map} +0 -0
- /package/dist/{render-AFFWMWKU.js.map → render-EWFXTGYC.js.map} +0 -0
- /package/dist/{seal-PBREQDNO.js.map → seal-B2FGIQ5C.js.map} +0 -0
- /package/dist/{setup-GJKNGTRT.js.map → setup-LRMO3ZKM.js.map} +0 -0
- /package/dist/{visual-HTE3YLPV.js.map → visual-UZQZUJIA.js.map} +0 -0
- /package/dist/{watch-F7W4ZM6Q.js.map → watch-SOK25KLD.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
blocksToPages,
|
|
3
3
|
bmpToPng,
|
|
4
4
|
inlineImagesIntoMarkdown
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EQNLV4YH.js";
|
|
6
6
|
import {
|
|
7
7
|
parsePageRange
|
|
8
8
|
} from "./chunk-V4BH5SRQ.js";
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
validateOcrOptions,
|
|
44
44
|
visibleText,
|
|
45
45
|
wrapScript
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-47NQ362T.js";
|
|
47
47
|
import {
|
|
48
48
|
KordocError,
|
|
49
49
|
OPTIONAL_DEP_INSTALL_HINT,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
toArrayBuffer,
|
|
62
62
|
unescapeHtml,
|
|
63
63
|
unzipLimitBytes
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-EMEEVTP2.js";
|
|
65
65
|
|
|
66
66
|
// src/plain-markdown.ts
|
|
67
67
|
function toPlainMarkdown(md2) {
|
|
@@ -24604,7 +24604,7 @@ var MIN_SIDE = 24;
|
|
|
24604
24604
|
async function ocrEmbeddedImages(blocks, options, warnings) {
|
|
24605
24605
|
const ocr = options?.ocr;
|
|
24606
24606
|
if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
|
|
24607
|
-
const { parseImageDocument } = await import("./image-ocr-
|
|
24607
|
+
const { parseImageDocument } = await import("./image-ocr-WHMF24OA.js");
|
|
24608
24608
|
let inserted = false, unreadable = 0;
|
|
24609
24609
|
let failed = null;
|
|
24610
24610
|
const walk = async (list, depth) => {
|
|
@@ -50291,7 +50291,8 @@ function cellContentExtent(cell2, memo) {
|
|
|
50291
50291
|
const pushed = baseV - (num2(om, "top") + o.height + num2(om, "bottom"));
|
|
50292
50292
|
const anchor = pushed >= -100 ? pushed : baseV - (memo?.paraGeom?.get(p.getAttribute("paraPrIDRef") ?? "")?.spaceBefore ?? 0);
|
|
50293
50293
|
const vo = num2(pos, "vertOffset");
|
|
50294
|
-
|
|
50294
|
+
const oh = o.tag === "tbl" ? Math.max(o.height, measureTableHeight(o.el, memo)) : o.height;
|
|
50295
|
+
ext = Math.max(ext, anchor + num2(om, "top") + Math.max(0, vo) + oh);
|
|
50295
50296
|
}
|
|
50296
50297
|
}
|
|
50297
50298
|
memo?.cell.set(cell2.el, ext);
|
|
@@ -52118,6 +52119,7 @@ function planTableRows(tbl2, cells, rowH, ty, MT, BODY_H, slack = 0, floatSpan,
|
|
|
52118
52119
|
const st = stackedFloats(rc[0]);
|
|
52119
52120
|
return st.length >= 2 && st.reduce((a, f) => a + f.h, 0) > h;
|
|
52120
52121
|
});
|
|
52122
|
+
if (slack > 0 && ty + rowY[nRows] > pageBottom && ty + rowY[nRows] <= pageBottom + slack && cells.some((c) => cellLineBoxes(c).some((b) => b.part > 0))) slack = 0;
|
|
52121
52123
|
if (BODY_H <= 0 || ty + rowY[nRows] <= pageBottom + slack && !stackOver) return plain4();
|
|
52122
52124
|
if (findChildByLocalName(tbl2, "pos")?.getAttribute("treatAsChar") === "1") {
|
|
52123
52125
|
const declared = num2(findChildByLocalName(tbl2, "sz"), "height") || rowY[nRows];
|
|
@@ -52168,6 +52170,14 @@ function planTableRows(tbl2, cells, rowH, ty, MT, BODY_H, slack = 0, floatSpan,
|
|
|
52168
52170
|
const boxes = splittable ? new Map(rowCells.map((c) => [c.el, cellLineBoxes(c)])) : void 0;
|
|
52169
52171
|
const hParts = boxes ? Math.max(0, ...[...boxes.values()].flatMap((bs) => bs.map((b) => b.part))) : 0;
|
|
52170
52172
|
if (boxes && hParts > 0) {
|
|
52173
|
+
if (!first && rowCells.some((c) => {
|
|
52174
|
+
const b = (boxes.get(c.el) ?? []).find((x) => x.part === 0);
|
|
52175
|
+
return !!b && c.marginT + b.bottom - b.origin > pageBottom - y - c.marginB;
|
|
52176
|
+
})) {
|
|
52177
|
+
page++;
|
|
52178
|
+
y = contTop;
|
|
52179
|
+
first = true;
|
|
52180
|
+
}
|
|
52171
52181
|
const declared = num2(findChildByLocalName(tbl2, "sz"), "height");
|
|
52172
52182
|
const led = /* @__PURE__ */ new Set();
|
|
52173
52183
|
let firstPh = 0;
|
|
@@ -52242,6 +52252,29 @@ function planTableRows(tbl2, cells, rowH, ty, MT, BODY_H, slack = 0, floatSpan,
|
|
|
52242
52252
|
first = false;
|
|
52243
52253
|
continue;
|
|
52244
52254
|
}
|
|
52255
|
+
if (boxes && floatSpan) {
|
|
52256
|
+
let span2 = 0, spanEnd = 0, mB = 0;
|
|
52257
|
+
for (const c of rowCells) for (const b of boxes.get(c.el) ?? []) {
|
|
52258
|
+
const f = floatSpan(b.seg, y + c.marginT + b.top, contTop + c.marginT);
|
|
52259
|
+
if (f && f.pages > span2) {
|
|
52260
|
+
span2 = f.pages;
|
|
52261
|
+
spanEnd = f.endY;
|
|
52262
|
+
mB = c.marginB;
|
|
52263
|
+
}
|
|
52264
|
+
}
|
|
52265
|
+
if (span2 > 0) {
|
|
52266
|
+
const none = new Map(rowCells.map((c) => [c.el, [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]]));
|
|
52267
|
+
pieces.push({ page, y, h: pageBottom - y, range: new Map(rowCells.map((c) => [c.el, [0, Number.POSITIVE_INFINITY]])), fill: true });
|
|
52268
|
+
for (let e = 1; e < span2; e++) pieces.push({ page: page + e, y: contTop, h: pageBottom - contTop, range: none, fill: true });
|
|
52269
|
+
page += span2;
|
|
52270
|
+
const endH = Math.max(0, spanEnd - contTop) + mB;
|
|
52271
|
+
pieces.push({ page, y: contTop, h: endH, range: none });
|
|
52272
|
+
out.push(pieces);
|
|
52273
|
+
y = contTop + endH;
|
|
52274
|
+
first = false;
|
|
52275
|
+
continue;
|
|
52276
|
+
}
|
|
52277
|
+
}
|
|
52245
52278
|
if (splittable && y + h > pageBottom) {
|
|
52246
52279
|
const from = /* @__PURE__ */ new Map();
|
|
52247
52280
|
const lines = new Map(rowCells.map((c) => [c.el, cellLines(c)]));
|
|
@@ -53047,7 +53080,7 @@ function drawPara(p, ox, oy, areaW, ctx, depth, segPages) {
|
|
|
53047
53080
|
const tbFloats = m.objs.filter((q) => !q.inline && (q.el.getAttribute("textWrap") ?? "TOP_AND_BOTTOM") === "TOP_AND_BOTTOM" && (findChildByLocalName(q.el, "pos")?.getAttribute("vertRelTo") ?? "PARA") === "PARA").length;
|
|
53048
53081
|
let stay = tbFloats < 2 && !m.objs.some((q) => q.inline) && !m.chars.some((c) => c.ch !== "" && !c.nb && c.ch.trim() !== "");
|
|
53049
53082
|
const sbA = m.paraPrId != null ? ctx.styles.paraGeom.get(m.paraPrId)?.spaceBefore ?? 0 : 0;
|
|
53050
|
-
if (stay && wrapA === "TOP_AND_BOTTOM" && linePushedBy(o, anchorLineV ?? baseV, pTop)) stay = false;
|
|
53083
|
+
if (stay && wrapA === "TOP_AND_BOTTOM" && linePushedBy(o, anchorLineV ?? baseV, pTop ?? (depth > 0 ? cellParaTop(p, ctx.styles.paraGeom) : void 0))) stay = false;
|
|
53051
53084
|
const firstLine = anchorLineV === void 0 || anchorLineV === baseV;
|
|
53052
53085
|
let { x, y } = anchorObject(o, ax, oy, objBaseV, aw, ctx, anchorLineV, stay ? sbA : false, (firstLine || wrapA === "SQUARE") && pTop !== void 0 && pTop < baseV ? pTop : void 0, firstLine ? void 0 : anchorLineH);
|
|
53053
53086
|
if (depth === 0 && tbFloats >= 2 && wrapA === "TOP_AND_BOTTOM") {
|
|
@@ -53241,7 +53274,9 @@ function cellFloatSpan(MT, BODY_H, memo, slack) {
|
|
|
53241
53274
|
if ((pos?.getAttribute("vertRelTo") ?? "PARA") !== "PARA") continue;
|
|
53242
53275
|
const segK = Math.max(0, m.segs.findIndex((sg, i) => sg.textpos <= o.index && (i === m.segs.length - 1 || m.segs[i + 1].textpos > o.index)));
|
|
53243
53276
|
if (segK !== k) continue;
|
|
53244
|
-
const
|
|
53277
|
+
const segV = num2(seg, "vertpos"), pTop = cellParaTop(p, memo.paraGeom ?? /* @__PURE__ */ new Map());
|
|
53278
|
+
const start = linePushedBy(o, segV, pTop) ? top - (segV - (pTop ?? segV)) : top;
|
|
53279
|
+
const ty = start + num2(findChildByLocalName(o.el, "outMargin"), "top") + Math.max(0, toInt32(pos?.getAttribute("vertOffset") ?? void 0, 0));
|
|
53245
53280
|
const span2 = tableContPages(o.el, ty, MT, BODY_H, memo, slack, cellFloatSpan(MT, BODY_H, memo, slack), true, contMT);
|
|
53246
53281
|
if (span2.pages > 0 && (!best || span2.pages > best.pages)) best = { ...span2, el: o.el };
|
|
53247
53282
|
}
|
|
@@ -53321,7 +53356,7 @@ function drawTable(tbl2, tx, ty, ctx, depth) {
|
|
|
53321
53356
|
const va2 = c.sub.getAttribute("vertAlign") ?? "TOP";
|
|
53322
53357
|
const lastK = g3.pieces.length - 1;
|
|
53323
53358
|
const pieceOff = g3.pieces.map((pc, k) => {
|
|
53324
|
-
if (va2 === "TOP" || k > 0 && k < lastK) return 0;
|
|
53359
|
+
if (va2 === "TOP" || k > 0 && k < lastK || pc.fill) return 0;
|
|
53325
53360
|
const from = pc.range?.get(c.el)?.[0] ?? 0;
|
|
53326
53361
|
const bottoms = boxes.filter((b) => pieceOf(b.top) === k).map((b) => b.bottom - from);
|
|
53327
53362
|
if (k > 0) for (const f of subFloatBottoms(c.sub)) {
|
|
@@ -53860,7 +53895,7 @@ function drawPageNumbers(root, paraPages, ctx) {
|
|
|
53860
53895
|
const text = side ? `${side} ${formatHeadNumber2(n, decl.el.getAttribute("formatType") ?? "DIGIT")} ${side}` : formatHeadNumber2(n, decl.el.getAttribute("formatType") ?? "DIGIT");
|
|
53861
53896
|
const w = measureTextWidth(text, h, 100, { faceClass: faceClassOf(st.face) });
|
|
53862
53897
|
const x = /LEFT/.test(pos) ? ML : /RIGHT/.test(pos) ? ML + BODY_W - w : (PW - w) / 2;
|
|
53863
|
-
const y = /^TOP/.test(pos) ? num2(margin, "top", 5668) - 225 : PH - num2(margin, "bottom", 4252) - 225;
|
|
53898
|
+
const y = /^TOP/.test(pos) ? num2(margin, "top", 5668) - 225 : num2(margin, "footer", 0) > 0 ? PH - num2(margin, "bottom", 4252) - 225 : PH - Math.round(num2(margin, "bottom", 4252) / 2) - 243;
|
|
53864
53899
|
const attrs = [`x="${pt2(x)}"`, `y="${pt2(y)}"`, `font-size="${pt2(h)}"`];
|
|
53865
53900
|
if (st.fontFamily) attrs.push(`font-family="${escapeXml7(st.fontFamily)}"`);
|
|
53866
53901
|
ctx.page = page;
|
|
@@ -55028,7 +55063,7 @@ function scriptsOff(r, off) {
|
|
|
55028
55063
|
}
|
|
55029
55064
|
async function parseImage(buffer, options) {
|
|
55030
55065
|
try {
|
|
55031
|
-
const { parseImageDocument } = await import("./image-ocr-
|
|
55066
|
+
const { parseImageDocument } = await import("./image-ocr-WHMF24OA.js");
|
|
55032
55067
|
const { blocks, warnings, lines } = await parseImageDocument(buffer, options);
|
|
55033
55068
|
stripScriptTags({ blocks });
|
|
55034
55069
|
return {
|
|
@@ -55092,7 +55127,7 @@ async function parseHwp(buffer, options) {
|
|
|
55092
55127
|
async function parsePdf(buffer, options) {
|
|
55093
55128
|
let parsePdfDocument;
|
|
55094
55129
|
try {
|
|
55095
|
-
const mod = await import("./parser-
|
|
55130
|
+
const mod = await import("./parser-4L4HI6KN.js");
|
|
55096
55131
|
parsePdfDocument = mod.parsePdfDocument;
|
|
55097
55132
|
} catch {
|
|
55098
55133
|
return {
|