kordoc 4.18.1 → 4.18.3
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 +7 -6
- package/dist/{-X4KTLQC6.js → -WOKB25R2.js} +13 -11
- package/dist/{chunk-UTVMLJZE.js → chunk-2I2RTJJ5.js} +433 -71
- package/dist/chunk-2I2RTJJ5.js.map +1 -0
- package/dist/{chunk-Q5N4YS3T.cjs → chunk-2ZBLQVAS.cjs} +20 -13
- package/dist/chunk-2ZBLQVAS.cjs.map +1 -0
- package/dist/{chunk-KXR4CTFT.js → chunk-3FZGL3IL.js} +2 -2
- package/dist/{chunk-R2IFWAHI.js → chunk-5X7XWYR2.js} +2 -2
- package/dist/{chunk-PWRY4W6Q.js → chunk-6GLTGOP6.js} +2 -2
- package/dist/{chunk-SQQ4ITJ5.js → chunk-AZQWESRH.js} +2 -2
- package/dist/{chunk-KBZ3MQJX.js → chunk-BGOR5GCF.js} +2 -2
- package/dist/{chunk-WWOTHS2E.js → chunk-BJ6RYYXV.js} +205 -7
- package/dist/chunk-BJ6RYYXV.js.map +1 -0
- package/dist/{chunk-VDIXNEWV.js → chunk-CAN5P6N6.js} +10 -5
- package/dist/chunk-CAN5P6N6.js.map +1 -0
- package/dist/chunk-GS7T56RP.cjs.map +1 -1
- package/dist/{chunk-SIZ63E5G.cjs → chunk-HZV52V2X.cjs} +3 -3
- package/dist/chunk-HZV52V2X.cjs.map +1 -0
- package/dist/{chunk-X625PCZM.js → chunk-IXX3WHIE.js} +3 -3
- package/dist/{chunk-6V7QRQY3.js → chunk-J2A46VCA.js} +125 -87
- package/dist/chunk-J2A46VCA.js.map +1 -0
- package/dist/chunk-J55UQC5H.cjs.map +1 -1
- package/dist/{chunk-AQUNBGXH.js → chunk-KSJ7GKNQ.js} +2 -2
- package/dist/{chunk-Z4KCEERM.js → chunk-NES5U4JK.js} +3 -3
- package/dist/{chunk-MTTYJEKA.js → chunk-OOX2GZZ4.js} +2 -2
- package/dist/{chunk-HUGBJVAA.js → chunk-PSJLB3SZ.js} +16 -9
- package/dist/chunk-PSJLB3SZ.js.map +1 -0
- package/dist/{chunk-NQR3VKWN.js → chunk-RDBTOE5X.js} +2 -2
- package/dist/{chunk-2VFZQ634.js → chunk-RRURZDEK.js} +2 -2
- package/dist/{chunk-6N5BOPJI.js → chunk-RSDUH4XF.js} +4 -3
- package/dist/chunk-RSDUH4XF.js.map +1 -0
- package/dist/{chunk-PCSOJ523.cjs → chunk-SHRRD2TD.cjs} +10 -5
- package/dist/chunk-SHRRD2TD.cjs.map +1 -0
- package/dist/{chunk-TMC4A3FM.js → chunk-UVUKT3IQ.js} +13 -7
- package/dist/chunk-UVUKT3IQ.js.map +1 -0
- package/dist/{chunk-IXAXI2S3.cjs → chunk-V4BKT65D.cjs} +3 -3
- package/dist/chunk-V4BKT65D.cjs.map +1 -0
- package/dist/{chunk-I7YWXECO.js → chunk-VGDTONTB.js} +10 -5
- package/dist/chunk-VGDTONTB.js.map +1 -0
- package/dist/{chunk-K35WIYBD.js → chunk-W3RADOLO.js} +5 -4
- package/dist/chunk-W3RADOLO.js.map +1 -0
- package/dist/{chunk-5PNQIF3V.js → chunk-W7P4GPOV.js} +4 -4
- package/dist/{chunk-7DC2KL3V.cjs → chunk-WN5YLP7H.cjs} +161 -43
- package/dist/chunk-WN5YLP7H.cjs.map +1 -0
- package/dist/{chunk-IUMV45TX.cjs → chunk-ZD5WNQNC.cjs} +12 -12
- package/dist/chunk-ZD5WNQNC.cjs.map +1 -0
- package/dist/{chunk-CWJ5KY2F.js → chunk-ZN3LHNJG.js} +176 -43
- package/dist/chunk-ZN3LHNJG.js.map +1 -0
- package/dist/chunks-OQDRDICD.js +10 -0
- package/dist/cli.js +55 -34
- package/dist/cli.js.map +1 -1
- package/dist/{formula-W3GQC6L6.cjs → formula-BQ5RW5XD.cjs} +9 -9
- package/dist/formula-BQ5RW5XD.cjs.map +1 -0
- package/dist/{formula-LICM6K27.js → formula-GPCOJJXN.js} +3 -3
- package/dist/{formula-T4Q2UHWO.js → formula-QZAOKPBX.js} +4 -4
- package/dist/{image-ocr-WZJURDX6.js → image-ocr-POCME5I4.js} +6 -6
- package/dist/{image-ocr-XB2NFKGZ.js → image-ocr-TWNNVTZS.js} +9 -9
- package/dist/{image-ocr-7PNHBD2G.cjs → image-ocr-VKIUBLBX.cjs} +15 -15
- package/dist/image-ocr-VKIUBLBX.cjs.map +1 -0
- package/dist/index.cjs +1264 -778
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +606 -120
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +30 -31
- package/dist/mcp.js.map +1 -1
- package/dist/{model-bundle-O2XYR54X.js → model-bundle-THYUL7GG.js} +5 -5
- package/dist/{models-SKK3NH3V.js → models-U22N4RXX.js} +5 -5
- package/dist/page-range-QHHFTL7X.cjs.map +1 -1
- package/dist/{parser-PJUZSMFR.cjs → parser-JOMFOZLH.cjs} +213 -252
- package/dist/parser-JOMFOZLH.cjs.map +1 -0
- package/dist/{parser-4D2M5BKY.js → parser-NKP2NCSV.js} +27 -66
- package/dist/parser-NKP2NCSV.js.map +1 -0
- package/dist/{parser-5G5G7HHG.js → parser-SCXRLOW7.js} +24 -63
- package/dist/parser-SCXRLOW7.js.map +1 -0
- package/dist/pdf-ocr-NF4AY5MI.cjs +16 -0
- package/dist/pdf-ocr-NF4AY5MI.cjs.map +1 -0
- package/dist/pdf-ocr-OLII3WAG.js +15 -0
- package/dist/pdf-ocr-VJL7ON2Q.js +19 -0
- package/dist/{profile-io-BAQTYPK7.js → profile-io-UI3TZBYH.js} +3 -3
- package/dist/{rasterize-A2ZEACKV.js → rasterize-XMBV5H2I.js} +3 -3
- package/dist/{redact-doc-26KN2LSZ.js → redact-doc-7ZZMHDBO.js} +11 -11
- package/dist/{render-62ZUDMHB.js → render-SWRTUDAV.js} +7 -7
- package/dist/seal-UKKJZHKE.js +10 -0
- package/dist/{setup-2A3E6WRE.js → setup-43JJEEU7.js} +3 -3
- package/dist/visual-D2563HCJ.js +20 -0
- package/dist/{watch-D2T5FEKT.js → watch-NRATQ472.js} +14 -14
- package/dist/watch-NRATQ472.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-6N5BOPJI.js.map +0 -1
- package/dist/chunk-6V7QRQY3.js.map +0 -1
- package/dist/chunk-7DC2KL3V.cjs.map +0 -1
- package/dist/chunk-CWJ5KY2F.js.map +0 -1
- package/dist/chunk-HUGBJVAA.js.map +0 -1
- package/dist/chunk-I7YWXECO.js.map +0 -1
- package/dist/chunk-IUMV45TX.cjs.map +0 -1
- package/dist/chunk-IXAXI2S3.cjs.map +0 -1
- package/dist/chunk-K35WIYBD.js.map +0 -1
- package/dist/chunk-PCSOJ523.cjs.map +0 -1
- package/dist/chunk-Q5N4YS3T.cjs.map +0 -1
- package/dist/chunk-SIZ63E5G.cjs.map +0 -1
- package/dist/chunk-TMC4A3FM.js.map +0 -1
- package/dist/chunk-UTVMLJZE.js.map +0 -1
- package/dist/chunk-VDIXNEWV.js.map +0 -1
- package/dist/chunk-WWOTHS2E.js.map +0 -1
- package/dist/chunks-ACUC63N3.js +0 -10
- package/dist/formula-W3GQC6L6.cjs.map +0 -1
- package/dist/image-ocr-7PNHBD2G.cjs.map +0 -1
- package/dist/parser-4D2M5BKY.js.map +0 -1
- package/dist/parser-5G5G7HHG.js.map +0 -1
- package/dist/parser-PJUZSMFR.cjs.map +0 -1
- package/dist/pdf-ocr-EGWOIB6O.cjs +0 -16
- package/dist/pdf-ocr-EGWOIB6O.cjs.map +0 -1
- package/dist/pdf-ocr-NJTFXBRC.js +0 -19
- package/dist/pdf-ocr-ZXR6Q6BK.js +0 -15
- package/dist/seal-3GXC2API.js +0 -10
- package/dist/visual-4ZBZRMCM.js +0 -20
- package/dist/watch-D2T5FEKT.js.map +0 -1
- /package/dist/{-X4KTLQC6.js.map → -WOKB25R2.js.map} +0 -0
- /package/dist/{chunk-KXR4CTFT.js.map → chunk-3FZGL3IL.js.map} +0 -0
- /package/dist/{chunk-R2IFWAHI.js.map → chunk-5X7XWYR2.js.map} +0 -0
- /package/dist/{chunk-PWRY4W6Q.js.map → chunk-6GLTGOP6.js.map} +0 -0
- /package/dist/{chunk-SQQ4ITJ5.js.map → chunk-AZQWESRH.js.map} +0 -0
- /package/dist/{chunk-KBZ3MQJX.js.map → chunk-BGOR5GCF.js.map} +0 -0
- /package/dist/{chunk-X625PCZM.js.map → chunk-IXX3WHIE.js.map} +0 -0
- /package/dist/{chunk-AQUNBGXH.js.map → chunk-KSJ7GKNQ.js.map} +0 -0
- /package/dist/{chunk-Z4KCEERM.js.map → chunk-NES5U4JK.js.map} +0 -0
- /package/dist/{chunk-MTTYJEKA.js.map → chunk-OOX2GZZ4.js.map} +0 -0
- /package/dist/{chunk-NQR3VKWN.js.map → chunk-RDBTOE5X.js.map} +0 -0
- /package/dist/{chunk-2VFZQ634.js.map → chunk-RRURZDEK.js.map} +0 -0
- /package/dist/{chunk-5PNQIF3V.js.map → chunk-W7P4GPOV.js.map} +0 -0
- /package/dist/{chunks-ACUC63N3.js.map → chunks-OQDRDICD.js.map} +0 -0
- /package/dist/{formula-LICM6K27.js.map → formula-GPCOJJXN.js.map} +0 -0
- /package/dist/{formula-T4Q2UHWO.js.map → formula-QZAOKPBX.js.map} +0 -0
- /package/dist/{image-ocr-WZJURDX6.js.map → image-ocr-POCME5I4.js.map} +0 -0
- /package/dist/{image-ocr-XB2NFKGZ.js.map → image-ocr-TWNNVTZS.js.map} +0 -0
- /package/dist/{model-bundle-O2XYR54X.js.map → model-bundle-THYUL7GG.js.map} +0 -0
- /package/dist/{models-SKK3NH3V.js.map → models-U22N4RXX.js.map} +0 -0
- /package/dist/{pdf-ocr-NJTFXBRC.js.map → pdf-ocr-OLII3WAG.js.map} +0 -0
- /package/dist/{pdf-ocr-ZXR6Q6BK.js.map → pdf-ocr-VJL7ON2Q.js.map} +0 -0
- /package/dist/{profile-io-BAQTYPK7.js.map → profile-io-UI3TZBYH.js.map} +0 -0
- /package/dist/{rasterize-A2ZEACKV.js.map → rasterize-XMBV5H2I.js.map} +0 -0
- /package/dist/{redact-doc-26KN2LSZ.js.map → redact-doc-7ZZMHDBO.js.map} +0 -0
- /package/dist/{render-62ZUDMHB.js.map → render-SWRTUDAV.js.map} +0 -0
- /package/dist/{seal-3GXC2API.js.map → seal-UKKJZHKE.js.map} +0 -0
- /package/dist/{setup-2A3E6WRE.js.map → setup-43JJEEU7.js.map} +0 -0
- /package/dist/{visual-4ZBZRMCM.js.map → visual-D2563HCJ.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
blocksToPages,
|
|
3
3
|
encodePng
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BGOR5GCF.js";
|
|
5
5
|
import {
|
|
6
6
|
hasRequestedPagesAfter,
|
|
7
7
|
parsePageRange
|
|
@@ -44,24 +44,26 @@ import {
|
|
|
44
44
|
ocrModelsCached,
|
|
45
45
|
refineDocumentStyleHeadings,
|
|
46
46
|
removeHeaderFooterBlocks,
|
|
47
|
+
removeSideTabs,
|
|
47
48
|
startsNewItem,
|
|
48
49
|
trimTrailingEmptyTableCols,
|
|
49
50
|
wrapJoiner
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-BJ6RYYXV.js";
|
|
51
52
|
import {
|
|
52
53
|
CELL_EDGES,
|
|
53
54
|
CONTENT_CELLS,
|
|
54
55
|
WINGDINGS,
|
|
55
56
|
blocksToMarkdown,
|
|
56
57
|
escapeLiteralDollar,
|
|
58
|
+
escapeLiteralTags,
|
|
57
59
|
stripScriptTags,
|
|
58
60
|
unframeLayoutTables
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import "./chunk-
|
|
61
|
+
} from "./chunk-PSJLB3SZ.js";
|
|
62
|
+
import "./chunk-3FZGL3IL.js";
|
|
61
63
|
import {
|
|
62
64
|
KordocError,
|
|
63
65
|
sanitizeHref
|
|
64
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-CAN5P6N6.js";
|
|
65
67
|
|
|
66
68
|
// src/pdf/ocr-region-merge.ts
|
|
67
69
|
function mergeOcrImageRegions(blocks, page, regions, ocrBlocks) {
|
|
@@ -914,6 +916,17 @@ var CARRIED_MIN_COL_W = 4;
|
|
|
914
916
|
var LABEL_ROOM = 1.5;
|
|
915
917
|
var HANGING_MIN = 0.5;
|
|
916
918
|
var HANGING_TOL = 1;
|
|
919
|
+
var KO_ITEMS = "\uAC00\uB098\uB2E4\uB77C\uB9C8\uBC14\uC0AC\uC544\uC790\uCC28\uCE74\uD0C0\uD30C\uD558\uAC70\uB108\uB354\uB7EC\uBA38\uBC84\uC11C\uC5B4\uC800\uCC98\uCEE4\uD130\uD37C\uD5C8\uACE0\uB178\uB3C4\uB85C\uBAA8\uBCF4\uC18C\uC624\uC870\uCD08\uCF54\uD1A0\uD3EC\uD638\uAD6C\uB204\uB450\uB8E8\uBB34\uBD80\uC218\uC6B0\uC8FC\uCD94\uCFE0\uD22C\uD478\uD6C4";
|
|
920
|
+
var ITEM_MARK = /^\s*(?:([가-힣])\.|(\d{1,3})[.)]|\(([가-힣\d]{1,3})\))(?=\s)/;
|
|
921
|
+
function nextItemHead(prev, next) {
|
|
922
|
+
const a = ITEM_MARK.exec(prev), b = ITEM_MARK.exec(next);
|
|
923
|
+
if (!a || !b) return false;
|
|
924
|
+
const succ = (x, y) => /^\d+$/.test(x) ? /^\d+$/.test(y) && Number(y) === Number(x) + 1 : KO_ITEMS.indexOf(x) >= 0 && KO_ITEMS.indexOf(y) === KO_ITEMS.indexOf(x) + 1;
|
|
925
|
+
if (a[1] && b[1]) return succ(a[1], b[1]);
|
|
926
|
+
if (a[2] && b[2]) return succ(a[2], b[2]) && prev.trimStart()[a[2].length] === next.trimStart()[b[2].length];
|
|
927
|
+
if (a[3] && b[3]) return succ(a[3], b[3]);
|
|
928
|
+
return false;
|
|
929
|
+
}
|
|
917
930
|
function continuesAcross(u, d, x1, x2) {
|
|
918
931
|
const U = CELL_LINES.get(u), D = CELL_LINES.get(d);
|
|
919
932
|
if (!U?.length || !D?.length) return false;
|
|
@@ -1045,6 +1058,8 @@ function mergeSplitRow(table, owner, first, colXs, textOnly = false, cut = NO_CU
|
|
|
1045
1058
|
if (!carriedSplit) {
|
|
1046
1059
|
const norm = (c) => flowText(c.text).replace(/\s+/g, "");
|
|
1047
1060
|
if (pairs.some(([u, d]) => hasContent(d.cell) && norm(cell(d)) !== norm(cell(u)) && lineEnded(cell(u), colXs[u.c], colXs[u.c + u.cs], cell(d)))) return false;
|
|
1061
|
+
const oneLine = (c) => CELL_LINES.get(c)?.length === 1;
|
|
1062
|
+
if (pairs.some(([u, d]) => nextItemHead(cell(u).text, cell(d).text)) && pairs.some(([u, d]) => hasContent(u.cell) && hasContent(d.cell) && oneLine(cell(u)) && oneLine(cell(d)) && norm(cell(u)) !== norm(cell(d)))) return false;
|
|
1048
1063
|
const flows = ([u, d]) => continuesAcross(cell(u), cell(d), colXs[u.c], colXs[u.c + u.cs]) || clauseContinues(cell(u), cell(d));
|
|
1049
1064
|
if (!(cut.open && !newCell)) {
|
|
1050
1065
|
if (pairs.some((p) => p[1].rs > 1 && !flows(p))) return false;
|
|
@@ -2327,61 +2342,6 @@ function orderTwoUpPage(blocks, pageWidth, pageHeight) {
|
|
|
2327
2342
|
return [...left, ...right, ...rest];
|
|
2328
2343
|
}
|
|
2329
2344
|
|
|
2330
|
-
// src/pdf/side-tabs.ts
|
|
2331
|
-
var BAND = 0.12;
|
|
2332
|
-
var MAX_CHARS = 10;
|
|
2333
|
-
var MIN_REPEAT = 3;
|
|
2334
|
-
var RUN_GAP = 5;
|
|
2335
|
-
function removeSideTabs(blocks, pageWidths) {
|
|
2336
|
-
const edges = /* @__PURE__ */ new Map();
|
|
2337
|
-
for (const b of blocks) {
|
|
2338
|
-
if (!b.bbox || b.pageNumber === void 0 || [...b.text?.trim() ?? ""].length <= MAX_CHARS) continue;
|
|
2339
|
-
const e = edges.get(b.pageNumber) ?? { lefts: [], rights: [] };
|
|
2340
|
-
e.lefts.push(b.bbox.x);
|
|
2341
|
-
e.rights.push(b.bbox.x + b.bbox.width);
|
|
2342
|
-
edges.set(b.pageNumber, e);
|
|
2343
|
-
}
|
|
2344
|
-
const q = (xs, p) => {
|
|
2345
|
-
const v = [...xs].sort((a, b) => a - b);
|
|
2346
|
-
return v[Math.min(v.length - 1, Math.floor(p * v.length))];
|
|
2347
|
-
};
|
|
2348
|
-
const body = /* @__PURE__ */ new Map();
|
|
2349
|
-
for (const [page, e] of edges) body.set(page, { left: q(e.lefts, 0.2), right: q(e.rights, 0.8) });
|
|
2350
|
-
const all = [...body.values()];
|
|
2351
|
-
const fallback = all.length ? { left: q(all.map((e) => e.left), 0.5), right: q(all.map((e) => e.right), 0.5) } : void 0;
|
|
2352
|
-
const key = (b) => {
|
|
2353
|
-
const w = b.pageNumber !== void 0 ? pageWidths.get(b.pageNumber) : void 0;
|
|
2354
|
-
const text = b.text?.trim();
|
|
2355
|
-
const area = (b.pageNumber !== void 0 ? body.get(b.pageNumber) : void 0) ?? fallback;
|
|
2356
|
-
if (!w || !area || !b.bbox || !text || b.type === "table" || [...text].length > MAX_CHARS) return null;
|
|
2357
|
-
const side = b.bbox.x + b.bbox.width <= Math.min(w * BAND, area.left - 1) ? "L" : b.bbox.x >= Math.max(w * (1 - BAND), area.right + 1) ? "R" : null;
|
|
2358
|
-
return side && text.replace(/\s+/g, "");
|
|
2359
|
-
};
|
|
2360
|
-
const pages = /* @__PURE__ */ new Map();
|
|
2361
|
-
for (const b of blocks) {
|
|
2362
|
-
const k = key(b);
|
|
2363
|
-
if (k) pages.set(k, (pages.get(k) ?? /* @__PURE__ */ new Set()).add(b.pageNumber));
|
|
2364
|
-
}
|
|
2365
|
-
const running = /* @__PURE__ */ new Set();
|
|
2366
|
-
for (const [k, ps] of pages) {
|
|
2367
|
-
const list = [...ps].sort((a, b) => a - b);
|
|
2368
|
-
let run = [];
|
|
2369
|
-
const flush = () => {
|
|
2370
|
-
if (run.length >= MIN_REPEAT && run.length >= (run[run.length - 1] - run[0] + 1) * 0.4) for (const p of run) running.add(`${p}\0${k}`);
|
|
2371
|
-
run = [];
|
|
2372
|
-
};
|
|
2373
|
-
for (const p of list) {
|
|
2374
|
-
if (run.length && p - run[run.length - 1] > RUN_GAP) flush();
|
|
2375
|
-
run.push(p);
|
|
2376
|
-
}
|
|
2377
|
-
flush();
|
|
2378
|
-
}
|
|
2379
|
-
return running.size ? blocks.filter((b) => {
|
|
2380
|
-
const k = key(b);
|
|
2381
|
-
return !k || !running.has(`${b.pageNumber}\0${k}`);
|
|
2382
|
-
}) : blocks;
|
|
2383
|
-
}
|
|
2384
|
-
|
|
2385
2345
|
// src/pdf/footnotes.ts
|
|
2386
2346
|
var MARK = /^\d{1,3}\)$/;
|
|
2387
2347
|
function footnoteSeparators(horizontals, pageWidth, pageHeight) {
|
|
@@ -2731,7 +2691,7 @@ function mergeLinkRuns(markdown) {
|
|
|
2731
2691
|
|
|
2732
2692
|
// src/pdf/formula-ocr.ts
|
|
2733
2693
|
async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
|
|
2734
|
-
const formulaMod = await import("./formula-
|
|
2694
|
+
const formulaMod = await import("./formula-GPCOJJXN.js");
|
|
2735
2695
|
const { FormulaPipeline, ensureFormulaModels } = formulaMod;
|
|
2736
2696
|
await ensureFormulaModels((p) => {
|
|
2737
2697
|
if (p.phase === "download" && p.total) {
|
|
@@ -3026,6 +2986,7 @@ async function parsePdfDocument(buffer, options) {
|
|
|
3026
2986
|
if (!faceNames.has(face)) faceNames.set(face, (fontObj(face)?.name ?? "").replace(/^[A-Z]{6}\+/, ""));
|
|
3027
2987
|
}
|
|
3028
2988
|
for (const it of visible) if (it.text.includes("$")) it.text = escapeLiteralDollar(it.text);
|
|
2989
|
+
for (const it of visible) if (it.text.includes("<")) it.text = escapeLiteralTags(it.text);
|
|
3029
2990
|
wrapEquationRuns(visible, (face) => faceNames.get(face));
|
|
3030
2991
|
const pageArea = pageW * pageH;
|
|
3031
2992
|
if (pageArea > 0) {
|
|
@@ -3114,7 +3075,7 @@ async function parsePdfDocument(buffer, options) {
|
|
|
3114
3075
|
}
|
|
3115
3076
|
if (targets.size > 0) {
|
|
3116
3077
|
try {
|
|
3117
|
-
const { runPdfOcr } = await import("./pdf-ocr-
|
|
3078
|
+
const { runPdfOcr } = await import("./pdf-ocr-OLII3WAG.js");
|
|
3118
3079
|
const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
|
|
3119
3080
|
const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
|
|
3120
3081
|
const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages);
|
|
@@ -3346,4 +3307,4 @@ export {
|
|
|
3346
3307
|
parsePdfDocument,
|
|
3347
3308
|
removeHeaderFooterBlocks
|
|
3348
3309
|
};
|
|
3349
|
-
//# sourceMappingURL=parser-
|
|
3310
|
+
//# sourceMappingURL=parser-SCXRLOW7.js.map
|