kordoc 4.25.2 → 4.25.4
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/NOTICE +14 -8
- package/README.md +4 -4
- package/dist/{chunk-OQKYJVLL.js → chunk-35WXNRU4.js} +4 -4
- package/dist/{chunk-6VSEMZ2J.js → chunk-4XD2IEF7.js} +10 -10
- package/dist/{chunk-4X5R5EKL.js → chunk-A5DP2XNA.js} +6 -6
- package/dist/{chunk-N4WIRSNW.js → chunk-CO2A2WC5.js} +2 -2
- package/dist/{chunk-ZMLZVD3J.js → chunk-E6GI46SG.js} +2 -2
- package/dist/{chunk-RWWLUT3Z.js → chunk-ERNLA4BH.js} +25 -6
- package/dist/chunk-ERNLA4BH.js.map +7 -0
- package/dist/{chunk-BDBVGJW3.js → chunk-FDGWDXAD.js} +2 -2
- package/dist/{chunk-PE2Z234F.js → chunk-FLHUJYGP.js} +2 -2
- package/dist/{chunk-OE76DPYB.js → chunk-FVDYN3E7.js} +3 -3
- package/dist/{chunk-NXDACGEH.js → chunk-HR2KFPXI.js} +40 -5
- package/dist/{chunk-NXDACGEH.js.map → chunk-HR2KFPXI.js.map} +2 -2
- package/dist/{chunk-HS4V42R5.js → chunk-JKWHGHNW.js} +3 -3
- package/dist/{chunk-EWUBFEPZ.js → chunk-JNRXFGHU.js} +2 -2
- package/dist/{chunk-EWUBFEPZ.js.map → chunk-JNRXFGHU.js.map} +2 -2
- package/dist/{chunk-IK3FDYOE.js → chunk-KLWTVM6B.js} +2 -2
- package/dist/{chunk-AHJOET62.js → chunk-LQ3FFPJ6.js} +5 -5
- package/dist/{chunk-BVJX756H.js → chunk-M2V4WP7W.js} +33 -22
- package/dist/chunk-M2V4WP7W.js.map +7 -0
- package/dist/chunk-M3E5NYSN.js +45 -0
- package/dist/chunk-M3E5NYSN.js.map +7 -0
- package/dist/{chunk-KK3ADW4V.js → chunk-MGVESXR2.js} +152 -22
- package/dist/chunk-MGVESXR2.js.map +7 -0
- package/dist/{chunk-UMWSG2SJ.js → chunk-PVZRQRIE.js} +3 -3
- package/dist/{chunk-RR7F4MV7.js → chunk-RVUX6HWM.js} +2 -2
- package/dist/{chunk-CEYITKNO.js → chunk-RZOEJ5TZ.js} +2 -2
- package/dist/{chunk-RCFCHOMY.js → chunk-SEX4BBAX.js} +2 -2
- package/dist/{chunk-A36NOLXN.js → chunk-T7CUC2NM.js} +6 -6
- package/dist/{chunk-GUOXYUMU.js → chunk-TWAXYEO2.js} +2 -2
- package/dist/{chunk-ZHVSRDVF.js → chunk-UAUB6Y5Z.js} +6 -6
- package/dist/{chunk-GEWICG46.js → chunk-V2TGRTXA.js} +2 -2
- package/dist/{chunk-NRHDHCJN.js → chunk-XS7MBWUH.js} +2 -2
- package/dist/{chunk-QJWSNET3.js → chunk-ZG6RALGH.js} +8 -8
- package/dist/{chunk-5TRTCMDI.js → chunk-ZVBVGSXC.js} +2 -40
- package/dist/{chunk-5TRTCMDI.js.map → chunk-ZVBVGSXC.js.map} +3 -3
- package/dist/chunks-WSSD23QG.js +10 -0
- package/dist/cli.js +52 -41
- package/dist/cli.js.map +2 -2
- package/dist/{formula-6DMQSBFW.js → formula-TAHOTZCD.js} +4 -4
- package/dist/{generator-ORDTMIQM.js → generator-UNGTBZVD.js} +7 -7
- package/dist/{hancom-KN5SQMKT.js → hancom-Q3SEMBRZ.js} +2 -2
- package/dist/{image-ocr-LVJFXGL4.js → image-ocr-E3KNVXGP.js} +19 -16
- package/dist/image-ocr-E3KNVXGP.js.map +7 -0
- package/dist/index.cjs +361 -48
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.cts +37 -6
- package/dist/index.d.ts +37 -6
- package/dist/index.js +21 -20
- package/dist/mcp.js +35 -34
- package/dist/mcp.js.map +2 -2
- package/dist/memo-BK5AJ3GY.js +15 -0
- package/dist/{model-bundle-VWCZDFFG.js → model-bundle-SNYPWRM5.js} +5 -5
- package/dist/{models-R67ZWDF4.js → models-EMLB76WT.js} +9 -5
- package/dist/page-images-HZ2DRJGX.js +94 -0
- package/dist/page-images-HZ2DRJGX.js.map +7 -0
- package/dist/{parse-worker-v2-6WBBR7Z2.js → parse-worker-v2-XQPQK5RR.js} +26 -23
- package/dist/parse-worker-v2-XQPQK5RR.js.map +7 -0
- package/dist/{parser-TCYP5RBA.js → parser-MAPRIHZS.js} +35 -19
- package/dist/{parser-TCYP5RBA.js.map → parser-MAPRIHZS.js.map} +3 -3
- package/dist/{pdf-ocr-DVCI7AAR.js → pdf-ocr-GB3Z5UHQ.js} +13 -10
- package/dist/{profile-io-4XUVQIFE.js → profile-io-EVGG3THS.js} +3 -3
- package/dist/{rasterize-WUSJNYMZ.js → rasterize-7PQL2TCQ.js} +3 -3
- package/dist/{redact-doc-HCXNHJUZ.js → redact-doc-364J2TKR.js} +22 -21
- package/dist/{redact-doc-HCXNHJUZ.js.map → redact-doc-364J2TKR.js.map} +1 -1
- package/dist/{render-NGSGUNWX.js → render-AZ5YXHUA.js} +10 -10
- package/dist/{rewrite-fallback-S7F2TP4G.js → rewrite-fallback-VTXOOSUU.js} +12 -12
- package/dist/seal-A3HZQLN5.js +14 -0
- package/dist/{setup-ECJK3FIE.js → setup-6NQLZAV2.js} +3 -3
- package/dist/{to-hwpx-PSJYFTDW.js → to-hwpx-ULUHUGBZ.js} +7 -7
- package/dist/visual-VXECTX4R.js +39 -0
- package/dist/{watch-CTPPLNO4.js → watch-5FI3NIL2.js} +23 -22
- package/dist/{watch-CTPPLNO4.js.map → watch-5FI3NIL2.js.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-BVJX756H.js.map +0 -7
- package/dist/chunk-KK3ADW4V.js.map +0 -7
- package/dist/chunk-RWWLUT3Z.js.map +0 -7
- package/dist/chunks-JNZ2WBME.js +0 -10
- package/dist/image-ocr-LVJFXGL4.js.map +0 -7
- package/dist/memo-UJ4UYP5C.js +0 -15
- package/dist/parse-worker-v2-6WBBR7Z2.js.map +0 -7
- package/dist/seal-BB7STCXD.js +0 -14
- package/dist/visual-QQC436MI.js +0 -38
- /package/dist/{chunk-OQKYJVLL.js.map → chunk-35WXNRU4.js.map} +0 -0
- /package/dist/{chunk-6VSEMZ2J.js.map → chunk-4XD2IEF7.js.map} +0 -0
- /package/dist/{chunk-4X5R5EKL.js.map → chunk-A5DP2XNA.js.map} +0 -0
- /package/dist/{chunk-N4WIRSNW.js.map → chunk-CO2A2WC5.js.map} +0 -0
- /package/dist/{chunk-ZMLZVD3J.js.map → chunk-E6GI46SG.js.map} +0 -0
- /package/dist/{chunk-BDBVGJW3.js.map → chunk-FDGWDXAD.js.map} +0 -0
- /package/dist/{chunk-PE2Z234F.js.map → chunk-FLHUJYGP.js.map} +0 -0
- /package/dist/{chunk-OE76DPYB.js.map → chunk-FVDYN3E7.js.map} +0 -0
- /package/dist/{chunk-HS4V42R5.js.map → chunk-JKWHGHNW.js.map} +0 -0
- /package/dist/{chunk-IK3FDYOE.js.map → chunk-KLWTVM6B.js.map} +0 -0
- /package/dist/{chunk-AHJOET62.js.map → chunk-LQ3FFPJ6.js.map} +0 -0
- /package/dist/{chunk-UMWSG2SJ.js.map → chunk-PVZRQRIE.js.map} +0 -0
- /package/dist/{chunk-RR7F4MV7.js.map → chunk-RVUX6HWM.js.map} +0 -0
- /package/dist/{chunk-CEYITKNO.js.map → chunk-RZOEJ5TZ.js.map} +0 -0
- /package/dist/{chunk-RCFCHOMY.js.map → chunk-SEX4BBAX.js.map} +0 -0
- /package/dist/{chunk-A36NOLXN.js.map → chunk-T7CUC2NM.js.map} +0 -0
- /package/dist/{chunk-GUOXYUMU.js.map → chunk-TWAXYEO2.js.map} +0 -0
- /package/dist/{chunk-ZHVSRDVF.js.map → chunk-UAUB6Y5Z.js.map} +0 -0
- /package/dist/{chunk-GEWICG46.js.map → chunk-V2TGRTXA.js.map} +0 -0
- /package/dist/{chunk-NRHDHCJN.js.map → chunk-XS7MBWUH.js.map} +0 -0
- /package/dist/{chunk-QJWSNET3.js.map → chunk-ZG6RALGH.js.map} +0 -0
- /package/dist/{chunks-JNZ2WBME.js.map → chunks-WSSD23QG.js.map} +0 -0
- /package/dist/{formula-6DMQSBFW.js.map → formula-TAHOTZCD.js.map} +0 -0
- /package/dist/{generator-ORDTMIQM.js.map → generator-UNGTBZVD.js.map} +0 -0
- /package/dist/{hancom-KN5SQMKT.js.map → hancom-Q3SEMBRZ.js.map} +0 -0
- /package/dist/{memo-UJ4UYP5C.js.map → memo-BK5AJ3GY.js.map} +0 -0
- /package/dist/{model-bundle-VWCZDFFG.js.map → model-bundle-SNYPWRM5.js.map} +0 -0
- /package/dist/{models-R67ZWDF4.js.map → models-EMLB76WT.js.map} +0 -0
- /package/dist/{pdf-ocr-DVCI7AAR.js.map → pdf-ocr-GB3Z5UHQ.js.map} +0 -0
- /package/dist/{profile-io-4XUVQIFE.js.map → profile-io-EVGG3THS.js.map} +0 -0
- /package/dist/{rasterize-WUSJNYMZ.js.map → rasterize-7PQL2TCQ.js.map} +0 -0
- /package/dist/{render-NGSGUNWX.js.map → render-AZ5YXHUA.js.map} +0 -0
- /package/dist/{rewrite-fallback-S7F2TP4G.js.map → rewrite-fallback-VTXOOSUU.js.map} +0 -0
- /package/dist/{seal-BB7STCXD.js.map → seal-A3HZQLN5.js.map} +0 -0
- /package/dist/{setup-ECJK3FIE.js.map → setup-6NQLZAV2.js.map} +0 -0
- /package/dist/{to-hwpx-PSJYFTDW.js.map → to-hwpx-ULUHUGBZ.js.map} +0 -0
- /package/dist/{visual-QQC436MI.js.map → visual-VXECTX4R.js.map} +0 -0
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
parseFileHeader,
|
|
35
35
|
readRecords,
|
|
36
36
|
resolveLiteralLt
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-SEX4BBAX.js";
|
|
38
38
|
import {
|
|
39
39
|
TOC_ENTRY_BLOCKS,
|
|
40
40
|
takeTocLeaders
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
HEADING_RATIO_H3,
|
|
53
53
|
tidyScriptTags,
|
|
54
54
|
unframeLayoutTables
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-JNRXFGHU.js";
|
|
56
56
|
import {
|
|
57
57
|
MAX_COLS,
|
|
58
58
|
MAX_ROWS,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
flattenLayoutTables,
|
|
66
66
|
markNonLayoutTable,
|
|
67
67
|
sanitizeText
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-E6GI46SG.js";
|
|
69
69
|
import {
|
|
70
70
|
circledHangul,
|
|
71
71
|
circledNumber,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
import {
|
|
77
77
|
KordocError,
|
|
78
78
|
sanitizeHref
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-RZOEJ5TZ.js";
|
|
80
80
|
|
|
81
81
|
// src/memo-notes.ts
|
|
82
82
|
var squash = (s) => sanitizeText(s).replace(/\s+/g, "");
|
|
@@ -2758,4 +2758,4 @@ export {
|
|
|
2758
2758
|
parseHwp5Document,
|
|
2759
2759
|
extractHwp5MetadataOnly
|
|
2760
2760
|
};
|
|
2761
|
-
//# sourceMappingURL=chunk-
|
|
2761
|
+
//# sourceMappingURL=chunk-LQ3FFPJ6.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
extractRenderedRegions,
|
|
3
3
|
renderDocumentToScene
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZG6RALGH.js";
|
|
5
5
|
import {
|
|
6
6
|
EV,
|
|
7
7
|
blocksToPages,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
restoreUnmappedGlyphs,
|
|
18
18
|
spaceMappedDots,
|
|
19
19
|
wmfBitmap
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JKWHGHNW.js";
|
|
21
21
|
import {
|
|
22
22
|
applyCellEdit,
|
|
23
23
|
buildOrigUnits,
|
|
@@ -30,13 +30,13 @@ import {
|
|
|
30
30
|
resolveParagraphMappings,
|
|
31
31
|
resolveSectionEntryNames,
|
|
32
32
|
stripCellTokens
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4XD2IEF7.js";
|
|
34
34
|
import {
|
|
35
35
|
dcxPages,
|
|
36
36
|
hasLibheif,
|
|
37
37
|
heicToRgba,
|
|
38
38
|
pcxToRgba
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-V2TGRTXA.js";
|
|
40
40
|
import {
|
|
41
41
|
WEBP_OPTIONS,
|
|
42
42
|
flushHeifCache,
|
|
@@ -69,10 +69,10 @@ import {
|
|
|
69
69
|
summarize,
|
|
70
70
|
topLevelParagraphs,
|
|
71
71
|
usesV5Engine
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-T7CUC2NM.js";
|
|
73
73
|
import {
|
|
74
74
|
patchZipEntries
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-FLHUJYGP.js";
|
|
76
76
|
import {
|
|
77
77
|
ANNOTATION_BLANK_RE,
|
|
78
78
|
ValueCursor,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
rawTextContent,
|
|
112
112
|
readZipEntry,
|
|
113
113
|
warnInto
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-CO2A2WC5.js";
|
|
115
115
|
import {
|
|
116
116
|
comResultToParseResult,
|
|
117
117
|
extractTextViaCom,
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
memosMarkdown,
|
|
129
129
|
parseHwp5Document,
|
|
130
130
|
resolveImageBlocks
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-LQ3FFPJ6.js";
|
|
132
132
|
import {
|
|
133
133
|
MAX_PIXELS,
|
|
134
134
|
bmpToPng,
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
} from "./chunk-O5YMQ22P.js";
|
|
155
155
|
import {
|
|
156
156
|
validateOcrOptions
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-M3E5NYSN.js";
|
|
158
158
|
import {
|
|
159
159
|
normalizedSimilarity,
|
|
160
160
|
similarityUpperBound,
|
|
@@ -166,7 +166,7 @@ import {
|
|
|
166
166
|
stripScriptTags,
|
|
167
167
|
tidyScriptTags,
|
|
168
168
|
wrapScript
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-JNRXFGHU.js";
|
|
170
170
|
import {
|
|
171
171
|
MAX_COLS,
|
|
172
172
|
MAX_ROWS,
|
|
@@ -177,7 +177,7 @@ import {
|
|
|
177
177
|
flattenLayoutTables,
|
|
178
178
|
hasStructuredCellContent,
|
|
179
179
|
sanitizeText
|
|
180
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-E6GI46SG.js";
|
|
181
181
|
import {
|
|
182
182
|
hangulAmount,
|
|
183
183
|
mapPuaText
|
|
@@ -199,7 +199,7 @@ import {
|
|
|
199
199
|
toArrayBuffer,
|
|
200
200
|
unescapeHtml,
|
|
201
201
|
unzipLimitBytes
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-RZOEJ5TZ.js";
|
|
203
203
|
|
|
204
204
|
// src/table/visual.ts
|
|
205
205
|
import { readFile as readFile3 } from "node:fs/promises";
|
|
@@ -16977,7 +16977,7 @@ var MIN_SIDE = 24;
|
|
|
16977
16977
|
async function ocrEmbeddedImages(blocks, options, warnings) {
|
|
16978
16978
|
const ocr = options?.ocr;
|
|
16979
16979
|
if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
|
|
16980
|
-
const { parseImageDocument } = await import("./image-ocr-
|
|
16980
|
+
const { parseImageDocument } = await import("./image-ocr-E3KNVXGP.js");
|
|
16981
16981
|
let inserted = false, unreadable = 0;
|
|
16982
16982
|
let failed = null;
|
|
16983
16983
|
const walk = async (list, depth) => {
|
|
@@ -21053,7 +21053,8 @@ var MAX_MULTIPAGE_PIXELS = 1e9;
|
|
|
21053
21053
|
var MIN_PAGE_PIXELS = 1e6;
|
|
21054
21054
|
async function parseImage(buffer, options) {
|
|
21055
21055
|
try {
|
|
21056
|
-
const { parseImageDocument, imagePageCount, imagePage, imagePagePixels } = await import("./image-ocr-
|
|
21056
|
+
const { parseImageDocument, imagePageCount, imagePage, imagePagePixels, decodeToRgba } = await import("./image-ocr-E3KNVXGP.js");
|
|
21057
|
+
const pageRasters = options?.pageImages ? new (await import("./page-images-HZ2DRJGX.js")).PageImageSink(options.pageImages) : null;
|
|
21057
21058
|
const pageCount = await imagePageCount(buffer);
|
|
21058
21059
|
const wanted = pageCount > 1 && options?.pages ? parsePageRange(options.pages, pageCount) : null;
|
|
21059
21060
|
const blocks = [], warnings = [], lines = [], images = [];
|
|
@@ -21068,12 +21069,21 @@ async function parseImage(buffer, options) {
|
|
|
21068
21069
|
if (img) blocks.push({ type: "image", text: img.filename, pageNumber: page });
|
|
21069
21070
|
if (img && options?.images !== false && (imageBytes += img.data.length) <= MAX_PAGE_IMAGE_BYTES) images.push(img);
|
|
21070
21071
|
else if (options?.images !== false) skippedPages++;
|
|
21071
|
-
|
|
21072
|
-
|
|
21072
|
+
const r = options?.ocr === false ? null : await parseImageDocument(buffer, options, page);
|
|
21073
|
+
if (pageRasters?.full) pageRasters.skip(page);
|
|
21074
|
+
else if (pageRasters) {
|
|
21075
|
+
const raster = r?.raster ?? await decodeToRgba(buffer, page - 1).catch((e) => {
|
|
21076
|
+
warnings.push({ page, message: `\uD398\uC774\uC9C0 ${page} pageImages \uC0DD\uB7B5: ${sanitizeError(e)}`, code: "SKIPPED_IMAGE" });
|
|
21077
|
+
return null;
|
|
21078
|
+
});
|
|
21079
|
+
if (raster) await pageRasters.add(page, raster);
|
|
21080
|
+
}
|
|
21081
|
+
if (!r) continue;
|
|
21073
21082
|
blocks.push(...r.blocks);
|
|
21074
21083
|
warnings.push(...r.warnings);
|
|
21075
21084
|
if (r.lines) lines.push(r.lines);
|
|
21076
21085
|
}
|
|
21086
|
+
const pageImages = pageRasters?.finish(warnings);
|
|
21077
21087
|
if (skippedPages) warnings.push({ message: `\uD398\uC774\uC9C0 ${skippedPages}\uAC1C\uB294 \uC774\uBBF8\uC9C0\uB97C \uC0DD\uB7B5\uD588\uC2B5\uB2C8\uB2E4 \u2014 \uD398\uC774\uC9C0 \uC774\uBBF8\uC9C0 \uB204\uC801 \uC0C1\uD55C(128MB) \uB3C4\uB2EC, ${MAX_PIXELS / 1e4}\uB9CC \uD53D\uC140 \uCD08\uACFC \uB610\uB294 \uC190\uC0C1`, code: "SKIPPED_IMAGE" });
|
|
21078
21088
|
stripScriptTags({ blocks });
|
|
21079
21089
|
const normalized = await withImageFormat(blocks, blocksToMarkdown(blocks, { tableFormat: options?.tableFormat }), warnings.length ? warnings : void 0, images, options);
|
|
@@ -21085,7 +21095,8 @@ async function parseImage(buffer, options) {
|
|
|
21085
21095
|
warnings: normalized.warnings,
|
|
21086
21096
|
pageCount,
|
|
21087
21097
|
images: images.length ? images : void 0,
|
|
21088
|
-
...options?.ocrLines ? { ocrLines: lines } : {}
|
|
21098
|
+
...options?.ocrLines ? { ocrLines: lines } : {},
|
|
21099
|
+
...pageImages ? { pageImages } : {}
|
|
21089
21100
|
};
|
|
21090
21101
|
} catch (err) {
|
|
21091
21102
|
return { success: false, fileType: "image", error: sanitizeError(err), code: classifyError(err) };
|
|
@@ -21150,14 +21161,14 @@ async function parseHwp(buffer, options) {
|
|
|
21150
21161
|
async function parsePdf(buffer, options) {
|
|
21151
21162
|
let parsePdfDocument;
|
|
21152
21163
|
try {
|
|
21153
|
-
const mod = await import("./parser-
|
|
21164
|
+
const mod = await import("./parser-MAPRIHZS.js");
|
|
21154
21165
|
parsePdfDocument = mod.parsePdfDocument;
|
|
21155
21166
|
} catch (err) {
|
|
21156
21167
|
return { success: false, fileType: "pdf", error: sanitizeError(err), code: classifyError(err) };
|
|
21157
21168
|
}
|
|
21158
21169
|
try {
|
|
21159
|
-
const { markdown, blocks, metadata, outline, warnings, isImageBased, pageQuality, qualitySummary, images, pages, ocrLines } = await parsePdfDocument(buffer, options);
|
|
21160
|
-
return scriptsOff({ success: true, fileType: "pdf", markdown, blocks, metadata, outline, warnings, isImageBased, pageQuality, qualitySummary, images, pages, pageCount: metadata?.pageCount, ...ocrLines ? { ocrLines } : {} }, options?.scriptTags !== true);
|
|
21170
|
+
const { markdown, blocks, metadata, outline, warnings, isImageBased, pageQuality, qualitySummary, images, pages, ocrLines, pageImages } = await parsePdfDocument(buffer, options);
|
|
21171
|
+
return scriptsOff({ success: true, fileType: "pdf", markdown, blocks, metadata, outline, warnings, isImageBased, pageQuality, qualitySummary, images, pages, pageCount: metadata?.pageCount, ...ocrLines ? { ocrLines } : {}, ...pageImages ? { pageImages } : {} }, options?.scriptTags !== true);
|
|
21161
21172
|
} catch (err) {
|
|
21162
21173
|
const isImageBased = err instanceof Error && "isImageBased" in err ? true : void 0;
|
|
21163
21174
|
return { success: false, fileType: "pdf", error: sanitizeError(err), code: classifyError(err), isImageBased };
|
|
@@ -21227,7 +21238,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
|
|
|
21227
21238
|
throw new Error(`hwpx-preserve \uD3EC\uB9F7\uC740 HWPX\xB7HWP 5.x \uC785\uB825\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4 (\uAC10\uC9C0\uB41C \uD3EC\uB9F7: ${zipFormat})`);
|
|
21228
21239
|
}
|
|
21229
21240
|
} else if (format2 === "hwp" && detectOle2Format(buffer) === "hwp") {
|
|
21230
|
-
const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-
|
|
21241
|
+
const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-ULUHUGBZ.js");
|
|
21231
21242
|
const hwpx = await hwpToHwpx2(new Uint8Array(buffer));
|
|
21232
21243
|
buffer = hwpx.buffer.slice(hwpx.byteOffset, hwpx.byteOffset + hwpx.byteLength);
|
|
21233
21244
|
} else {
|
|
@@ -21380,4 +21391,4 @@ export {
|
|
|
21380
21391
|
parseHwpml,
|
|
21381
21392
|
fillForm
|
|
21382
21393
|
};
|
|
21383
|
-
//# sourceMappingURL=chunk-
|
|
21394
|
+
//# sourceMappingURL=chunk-M2V4WP7W.js.map
|