hwpx-js 0.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/LICENSE +195 -0
- package/README.md +158 -0
- package/dist/index.cjs +2413 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +444 -0
- package/dist/index.d.ts +444 -0
- package/dist/index.js +2378 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
interface HWPXDocument {
|
|
2
|
+
meta: DocumentMeta;
|
|
3
|
+
head: DocumentHead;
|
|
4
|
+
sections: Section[];
|
|
5
|
+
binData: BinDataItem[];
|
|
6
|
+
}
|
|
7
|
+
interface DocumentMeta {
|
|
8
|
+
hwpVersion: string;
|
|
9
|
+
createdAt?: string;
|
|
10
|
+
modifiedAt?: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
creator?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
subject?: string;
|
|
15
|
+
keywords?: string[];
|
|
16
|
+
}
|
|
17
|
+
interface DocumentHead {
|
|
18
|
+
charProperties: CharProperty[];
|
|
19
|
+
paraProperties: ParaProperty[];
|
|
20
|
+
styles: Style[];
|
|
21
|
+
borderFills: BorderFill[];
|
|
22
|
+
fontFaces: FontFace[];
|
|
23
|
+
bulletProperties: BulletProperty[];
|
|
24
|
+
numberingProperties: NumberingProperty[];
|
|
25
|
+
compatibleDoc?: string;
|
|
26
|
+
}
|
|
27
|
+
interface FontFace {
|
|
28
|
+
lang: FontLang;
|
|
29
|
+
fontName: string;
|
|
30
|
+
fontType?: 'ttf' | 'hps' | 'unknown';
|
|
31
|
+
substFont?: string;
|
|
32
|
+
}
|
|
33
|
+
type FontLang = 'HANGUL' | 'LATIN' | 'HANJA' | 'JAPANESE' | 'OTHER' | 'SYMBOL' | 'USER';
|
|
34
|
+
interface CharProperty {
|
|
35
|
+
id: number;
|
|
36
|
+
height: number;
|
|
37
|
+
textColor: number;
|
|
38
|
+
shadeColor?: number;
|
|
39
|
+
bold?: boolean;
|
|
40
|
+
italic?: boolean;
|
|
41
|
+
underline?: UnderlineType;
|
|
42
|
+
strikeout?: StrikeoutType;
|
|
43
|
+
fontRef: FontRef;
|
|
44
|
+
spacing?: number;
|
|
45
|
+
relSize?: number;
|
|
46
|
+
charOffset?: number;
|
|
47
|
+
useFontSpace?: boolean;
|
|
48
|
+
useKerning?: boolean;
|
|
49
|
+
}
|
|
50
|
+
interface FontRef {
|
|
51
|
+
hangul: number;
|
|
52
|
+
latin: number;
|
|
53
|
+
hanja: number;
|
|
54
|
+
japanese: number;
|
|
55
|
+
other: number;
|
|
56
|
+
symbol: number;
|
|
57
|
+
user: number;
|
|
58
|
+
}
|
|
59
|
+
type UnderlineType = 'NONE' | 'BOTTOM' | 'CENTER' | 'TOP';
|
|
60
|
+
type StrikeoutType = 'NONE' | 'CONTINUOUS';
|
|
61
|
+
interface ParaProperty {
|
|
62
|
+
id: number;
|
|
63
|
+
alignment?: Alignment;
|
|
64
|
+
heading?: HeadingType;
|
|
65
|
+
lineSpacing: SpacingValue;
|
|
66
|
+
paraMargin: ParaMargin;
|
|
67
|
+
tabDef?: TabDef;
|
|
68
|
+
breakBefore?: BreakType;
|
|
69
|
+
}
|
|
70
|
+
interface SpacingValue {
|
|
71
|
+
type: 'PERCENT' | 'FIXED' | 'BETWEEN_LINES' | 'AT_LEAST';
|
|
72
|
+
value: number;
|
|
73
|
+
}
|
|
74
|
+
interface ParaMargin {
|
|
75
|
+
left: number;
|
|
76
|
+
right: number;
|
|
77
|
+
indent: number;
|
|
78
|
+
prevSpacing: number;
|
|
79
|
+
nextSpacing: number;
|
|
80
|
+
}
|
|
81
|
+
interface TabDef {
|
|
82
|
+
autoTabLeft?: boolean;
|
|
83
|
+
autoTabRight?: boolean;
|
|
84
|
+
tabs?: TabItem[];
|
|
85
|
+
}
|
|
86
|
+
interface TabItem {
|
|
87
|
+
pos: number;
|
|
88
|
+
type: 'LEFT' | 'RIGHT' | 'CENTER' | 'DECIMAL';
|
|
89
|
+
leader: 'NONE' | 'SOLID' | 'DASH' | 'DOT';
|
|
90
|
+
}
|
|
91
|
+
type Alignment = 'JUSTIFY' | 'LEFT' | 'RIGHT' | 'CENTER' | 'DISTRIBUTE' | 'DISTRIBUTE_SPACE';
|
|
92
|
+
type HeadingType = 'NONE' | 'OUTLINE' | 'NUMBER' | 'BULLET';
|
|
93
|
+
type BreakType = 'NONE' | 'PAGE' | 'COLUMN' | 'SECTION';
|
|
94
|
+
interface Style {
|
|
95
|
+
id: number;
|
|
96
|
+
type: 'PARA' | 'CHAR';
|
|
97
|
+
name: string;
|
|
98
|
+
engName?: string;
|
|
99
|
+
paraPrIDRef?: number;
|
|
100
|
+
charPrIDRef?: number;
|
|
101
|
+
nextStyleIDRef?: number;
|
|
102
|
+
}
|
|
103
|
+
interface BorderFill {
|
|
104
|
+
id: number;
|
|
105
|
+
borders: {
|
|
106
|
+
left: BorderLine;
|
|
107
|
+
right: BorderLine;
|
|
108
|
+
top: BorderLine;
|
|
109
|
+
bottom: BorderLine;
|
|
110
|
+
};
|
|
111
|
+
fillBrush?: FillBrush;
|
|
112
|
+
threeD?: boolean;
|
|
113
|
+
shadow?: boolean;
|
|
114
|
+
slash?: SlashType;
|
|
115
|
+
backSlash?: SlashType;
|
|
116
|
+
}
|
|
117
|
+
interface BorderLine {
|
|
118
|
+
type: BorderLineType;
|
|
119
|
+
width: BorderWidth;
|
|
120
|
+
color: number;
|
|
121
|
+
}
|
|
122
|
+
type BorderLineType = 'NONE' | 'SOLID' | 'DASH' | 'DOT' | 'DASH_DOT' | 'DASH_DOT_DOT' | 'LONG_DASH' | 'CIRCLE' | 'DOUBLE_SLIM' | 'SLIM_THICK' | 'THICK_SLIM' | 'SLIM_THICK_SLIM';
|
|
123
|
+
type BorderWidth = '0.1mm' | '0.12mm' | '0.15mm' | '0.2mm' | '0.25mm' | '0.3mm' | '0.4mm' | '0.5mm' | '0.6mm' | '0.7mm' | '1.0mm' | '1.5mm' | '2.0mm' | '3.0mm' | '4.0mm' | '5.0mm';
|
|
124
|
+
type SlashType = 'NONE' | 'CENTER' | 'COUNTER_CENTER';
|
|
125
|
+
interface FillBrush {
|
|
126
|
+
type: 'SOLID' | 'GRADIENT' | 'IMAGE' | 'NONE';
|
|
127
|
+
faceColor?: number;
|
|
128
|
+
patternColor?: number;
|
|
129
|
+
patternType?: PatternType;
|
|
130
|
+
}
|
|
131
|
+
type PatternType = 'NONE' | 'HORIZONTAL' | 'VERTICAL' | 'BACKSLASH' | 'SLASH' | 'CROSS' | 'CROSS_DIAGONAL';
|
|
132
|
+
interface BulletProperty {
|
|
133
|
+
id: number;
|
|
134
|
+
bulletChar: string;
|
|
135
|
+
bulletSize?: number;
|
|
136
|
+
}
|
|
137
|
+
interface NumberingProperty {
|
|
138
|
+
id: number;
|
|
139
|
+
levels: NumberingLevel[];
|
|
140
|
+
}
|
|
141
|
+
interface NumberingLevel {
|
|
142
|
+
format: NumberFormat;
|
|
143
|
+
prefix?: string;
|
|
144
|
+
suffix?: string;
|
|
145
|
+
start?: number;
|
|
146
|
+
}
|
|
147
|
+
type NumberFormat = 'DIGIT' | 'CIRCLE_DIGIT' | 'ROMAN_CAPITAL' | 'ROMAN_SMALL' | 'LATIN_CAPITAL' | 'LATIN_SMALL' | 'HANGUL' | 'CIRCLED_HANGUL' | 'HANJA';
|
|
148
|
+
interface Section {
|
|
149
|
+
def: SectionDef;
|
|
150
|
+
paragraphs: Paragraph[];
|
|
151
|
+
}
|
|
152
|
+
interface SectionDef {
|
|
153
|
+
pageWidth: number;
|
|
154
|
+
pageHeight: number;
|
|
155
|
+
pageMargin: PageMargin;
|
|
156
|
+
landscape?: boolean;
|
|
157
|
+
gutterType?: 'LEFT_ONLY' | 'LEFT_RIGHT' | 'TOP_BOTTOM';
|
|
158
|
+
columns?: ColumnDef;
|
|
159
|
+
headerFooter?: HeaderFooterDef;
|
|
160
|
+
}
|
|
161
|
+
interface PageMargin {
|
|
162
|
+
left: number;
|
|
163
|
+
right: number;
|
|
164
|
+
top: number;
|
|
165
|
+
bottom: number;
|
|
166
|
+
header: number;
|
|
167
|
+
footer: number;
|
|
168
|
+
gutter: number;
|
|
169
|
+
}
|
|
170
|
+
interface ColumnDef {
|
|
171
|
+
type: 'NORMAL' | 'DISTRIBUTE' | 'PARALLEL';
|
|
172
|
+
count: number;
|
|
173
|
+
gap: number;
|
|
174
|
+
sameSizes?: boolean;
|
|
175
|
+
}
|
|
176
|
+
interface HeaderFooterDef {
|
|
177
|
+
header?: SubDocument;
|
|
178
|
+
footer?: SubDocument;
|
|
179
|
+
}
|
|
180
|
+
interface SubDocument {
|
|
181
|
+
paragraphs: Paragraph[];
|
|
182
|
+
}
|
|
183
|
+
interface Paragraph {
|
|
184
|
+
paraPrIDRef: number;
|
|
185
|
+
styleIDRef: number;
|
|
186
|
+
runs: Run[];
|
|
187
|
+
}
|
|
188
|
+
type Run = TextRun | TableRun | PictureRun | DrawingRun | BreakRun;
|
|
189
|
+
interface TextRun {
|
|
190
|
+
t: 'text';
|
|
191
|
+
text: string;
|
|
192
|
+
charPrIDRef: number;
|
|
193
|
+
}
|
|
194
|
+
interface TableRun {
|
|
195
|
+
t: 'table';
|
|
196
|
+
table: Table;
|
|
197
|
+
charPrIDRef: number;
|
|
198
|
+
}
|
|
199
|
+
interface PictureRun {
|
|
200
|
+
t: 'picture';
|
|
201
|
+
picture: Picture;
|
|
202
|
+
charPrIDRef: number;
|
|
203
|
+
}
|
|
204
|
+
interface DrawingRun {
|
|
205
|
+
t: 'drawing';
|
|
206
|
+
drawing: DrawingObject;
|
|
207
|
+
charPrIDRef: number;
|
|
208
|
+
}
|
|
209
|
+
interface BreakRun {
|
|
210
|
+
t: 'break';
|
|
211
|
+
breakType: 'LINE' | 'PAGE' | 'COLUMN' | 'SECTION';
|
|
212
|
+
charPrIDRef: number;
|
|
213
|
+
}
|
|
214
|
+
interface Table {
|
|
215
|
+
rows: TableRow[];
|
|
216
|
+
borderFillIDRef: number;
|
|
217
|
+
cellSpacing?: number;
|
|
218
|
+
cellPadding?: CellPadding;
|
|
219
|
+
width: number;
|
|
220
|
+
rowCount: number;
|
|
221
|
+
colCount: number;
|
|
222
|
+
colWidths: number[];
|
|
223
|
+
}
|
|
224
|
+
interface TableRow {
|
|
225
|
+
cells: TableCell[];
|
|
226
|
+
height: number;
|
|
227
|
+
}
|
|
228
|
+
interface TableCell {
|
|
229
|
+
paragraphs: Paragraph[];
|
|
230
|
+
colSpan: number;
|
|
231
|
+
rowSpan: number;
|
|
232
|
+
width: number;
|
|
233
|
+
height: number;
|
|
234
|
+
borderFillIDRef: number;
|
|
235
|
+
padding?: CellPadding;
|
|
236
|
+
}
|
|
237
|
+
interface CellPadding {
|
|
238
|
+
left: number;
|
|
239
|
+
right: number;
|
|
240
|
+
top: number;
|
|
241
|
+
bottom: number;
|
|
242
|
+
}
|
|
243
|
+
interface Picture {
|
|
244
|
+
binDataIDRef: number;
|
|
245
|
+
width: number;
|
|
246
|
+
height: number;
|
|
247
|
+
offsetX?: number;
|
|
248
|
+
offsetY?: number;
|
|
249
|
+
cropRect?: CropRect;
|
|
250
|
+
}
|
|
251
|
+
interface CropRect {
|
|
252
|
+
left: number;
|
|
253
|
+
right: number;
|
|
254
|
+
top: number;
|
|
255
|
+
bottom: number;
|
|
256
|
+
}
|
|
257
|
+
interface DrawingObject {
|
|
258
|
+
type: 'line' | 'rect' | 'ellipse' | 'polygon' | 'arc';
|
|
259
|
+
width: number;
|
|
260
|
+
height: number;
|
|
261
|
+
points?: {
|
|
262
|
+
x: number;
|
|
263
|
+
y: number;
|
|
264
|
+
}[];
|
|
265
|
+
lineColor?: number;
|
|
266
|
+
lineWidth?: number;
|
|
267
|
+
fillBrush?: FillBrush;
|
|
268
|
+
}
|
|
269
|
+
interface BinDataItem {
|
|
270
|
+
id: number;
|
|
271
|
+
format: 'jpg' | 'png' | 'gif' | 'bmp' | 'tiff' | 'wmf' | 'emf';
|
|
272
|
+
name: string;
|
|
273
|
+
data: Uint8Array;
|
|
274
|
+
}
|
|
275
|
+
interface WriteOptions {
|
|
276
|
+
compress?: boolean;
|
|
277
|
+
}
|
|
278
|
+
interface ReadOptions {
|
|
279
|
+
partial?: boolean;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
interface TextStyleOptions {
|
|
283
|
+
fontSize?: number;
|
|
284
|
+
bold?: boolean;
|
|
285
|
+
italic?: boolean;
|
|
286
|
+
color?: string;
|
|
287
|
+
underline?: boolean;
|
|
288
|
+
strikeout?: boolean;
|
|
289
|
+
fontName?: string;
|
|
290
|
+
}
|
|
291
|
+
interface StyledSegment {
|
|
292
|
+
text: string;
|
|
293
|
+
style?: TextStyleOptions;
|
|
294
|
+
}
|
|
295
|
+
interface PageSettings {
|
|
296
|
+
width?: number;
|
|
297
|
+
height?: number;
|
|
298
|
+
landscape?: boolean;
|
|
299
|
+
marginLeft?: number;
|
|
300
|
+
marginRight?: number;
|
|
301
|
+
marginTop?: number;
|
|
302
|
+
marginBottom?: number;
|
|
303
|
+
}
|
|
304
|
+
interface TableOptions {
|
|
305
|
+
headerRow?: boolean;
|
|
306
|
+
borderStyle?: BorderLineType;
|
|
307
|
+
colWidths?: number[];
|
|
308
|
+
cellPadding?: number;
|
|
309
|
+
width?: number;
|
|
310
|
+
}
|
|
311
|
+
interface ImageOptions {
|
|
312
|
+
width: number;
|
|
313
|
+
height: number;
|
|
314
|
+
}
|
|
315
|
+
interface CellMerge {
|
|
316
|
+
row: number;
|
|
317
|
+
col: number;
|
|
318
|
+
rowSpan: number;
|
|
319
|
+
colSpan: number;
|
|
320
|
+
}
|
|
321
|
+
interface ColumnSettings {
|
|
322
|
+
count: number;
|
|
323
|
+
gap?: number;
|
|
324
|
+
type?: 'NORMAL' | 'DISTRIBUTE' | 'PARALLEL';
|
|
325
|
+
}
|
|
326
|
+
interface HeaderFooterOptions {
|
|
327
|
+
header?: string;
|
|
328
|
+
footer?: string;
|
|
329
|
+
}
|
|
330
|
+
declare class HWPXBuilder {
|
|
331
|
+
private doc;
|
|
332
|
+
private charPrIdCounter;
|
|
333
|
+
private paraPrIdCounter;
|
|
334
|
+
private borderFillIdCounter;
|
|
335
|
+
private binDataIdCounter;
|
|
336
|
+
private charPrCache;
|
|
337
|
+
constructor();
|
|
338
|
+
/** 단일 스타일 문단 추가 */
|
|
339
|
+
addParagraph(text: string, style?: TextStyleOptions): this;
|
|
340
|
+
/** 복수 스타일 세그먼트로 구성된 문단 추가 */
|
|
341
|
+
addStyledText(segments: StyledSegment[]): this;
|
|
342
|
+
/** 빈 문단(빈 줄) 추가 */
|
|
343
|
+
addEmptyParagraph(): this;
|
|
344
|
+
/** 페이지 설정 변경 */
|
|
345
|
+
setPageSettings(opts: PageSettings): this;
|
|
346
|
+
/** 테이블 추가 (string[][] 데이터, 셀 병합은 merges 옵션) */
|
|
347
|
+
addTable(data: string[][], opts?: TableOptions & {
|
|
348
|
+
merges?: CellMerge[];
|
|
349
|
+
}): this;
|
|
350
|
+
/** 이미지 추가 */
|
|
351
|
+
addImage(data: Uint8Array, format: BinDataItem['format'], opts: ImageOptions): this;
|
|
352
|
+
/** 머리글/바닥글 설정 */
|
|
353
|
+
setHeaderFooter(opts: HeaderFooterOptions): this;
|
|
354
|
+
/** 다단 설정 */
|
|
355
|
+
setColumns(opts: ColumnSettings): this;
|
|
356
|
+
/** 새 섹션 시작 */
|
|
357
|
+
addSection(): this;
|
|
358
|
+
/** 문서 빌드 */
|
|
359
|
+
build(): HWPXDocument;
|
|
360
|
+
private currentSection;
|
|
361
|
+
private getOrCreateCharPr;
|
|
362
|
+
private ensureFont;
|
|
363
|
+
private getOrCreateTableBorderFill;
|
|
364
|
+
private styleKey;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
declare function createDefaultFontFaces(): FontFace[];
|
|
368
|
+
declare function createDefaultCharProperty(id?: number): CharProperty;
|
|
369
|
+
declare function createDefaultParaProperty(id?: number): ParaProperty;
|
|
370
|
+
declare function createDefaultBorderFill(id?: number): BorderFill;
|
|
371
|
+
declare function createDefaultStyles(): Style[];
|
|
372
|
+
declare function createDefaultSectionDef(): SectionDef;
|
|
373
|
+
declare function createDefaultHead(): DocumentHead;
|
|
374
|
+
declare function createDefaultMeta(): DocumentMeta;
|
|
375
|
+
declare function createDefaultDocument(): HWPXDocument;
|
|
376
|
+
|
|
377
|
+
declare function mmToHwpunit(mm: number): number;
|
|
378
|
+
declare function hwpunitToMm(hu: number): number;
|
|
379
|
+
declare function ptToHwpunit(pt: number): number;
|
|
380
|
+
declare function hwpunitToPt(hu: number): number;
|
|
381
|
+
declare function pxToHwpunit(px: number, dpi?: number): number;
|
|
382
|
+
declare function hwpunitToPx(hu: number, dpi?: number): number;
|
|
383
|
+
/** 한글 글자 크기 단위: 1pt = 100 unit */
|
|
384
|
+
declare function ptToCharHeight(pt: number): number;
|
|
385
|
+
declare function charHeightToPt(height: number): number;
|
|
386
|
+
|
|
387
|
+
declare function hexToColorref(hex: string): number;
|
|
388
|
+
declare function colorrefToHex(colorref: number): string;
|
|
389
|
+
/** COLORREF를 "R, G, B" 형식 문자열로 */
|
|
390
|
+
declare function colorrefToRgbString(colorref: number): string;
|
|
391
|
+
/** 0x00RRGGBB (일반 RGB 정수)를 COLORREF로 변환 */
|
|
392
|
+
declare function rgbToColorref(rgb: number): number;
|
|
393
|
+
|
|
394
|
+
declare class IdCounter {
|
|
395
|
+
private value;
|
|
396
|
+
constructor(start?: number);
|
|
397
|
+
next(): number;
|
|
398
|
+
current(): number;
|
|
399
|
+
reset(start?: number): void;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
type DocumentFormat = 'hwpx' | 'hwp5' | 'unknown';
|
|
403
|
+
/** 바이트 데이터의 magic bytes로 문서 포맷 감지 */
|
|
404
|
+
declare function detectFormat(data: Uint8Array): DocumentFormat;
|
|
405
|
+
|
|
406
|
+
type index_DocumentFormat = DocumentFormat;
|
|
407
|
+
type index_IdCounter = IdCounter;
|
|
408
|
+
declare const index_IdCounter: typeof IdCounter;
|
|
409
|
+
declare const index_charHeightToPt: typeof charHeightToPt;
|
|
410
|
+
declare const index_colorrefToHex: typeof colorrefToHex;
|
|
411
|
+
declare const index_colorrefToRgbString: typeof colorrefToRgbString;
|
|
412
|
+
declare const index_detectFormat: typeof detectFormat;
|
|
413
|
+
declare const index_hexToColorref: typeof hexToColorref;
|
|
414
|
+
declare const index_hwpunitToMm: typeof hwpunitToMm;
|
|
415
|
+
declare const index_hwpunitToPt: typeof hwpunitToPt;
|
|
416
|
+
declare const index_hwpunitToPx: typeof hwpunitToPx;
|
|
417
|
+
declare const index_mmToHwpunit: typeof mmToHwpunit;
|
|
418
|
+
declare const index_ptToCharHeight: typeof ptToCharHeight;
|
|
419
|
+
declare const index_ptToHwpunit: typeof ptToHwpunit;
|
|
420
|
+
declare const index_pxToHwpunit: typeof pxToHwpunit;
|
|
421
|
+
declare const index_rgbToColorref: typeof rgbToColorref;
|
|
422
|
+
declare namespace index {
|
|
423
|
+
export { type index_DocumentFormat as DocumentFormat, index_IdCounter as IdCounter, index_charHeightToPt as charHeightToPt, index_colorrefToHex as colorrefToHex, index_colorrefToRgbString as colorrefToRgbString, index_detectFormat as detectFormat, index_hexToColorref as hexToColorref, index_hwpunitToMm as hwpunitToMm, index_hwpunitToPt as hwpunitToPt, index_hwpunitToPx as hwpunitToPx, index_mmToHwpunit as mmToHwpunit, index_ptToCharHeight as ptToCharHeight, index_ptToHwpunit as ptToHwpunit, index_pxToHwpunit as pxToHwpunit, index_rgbToColorref as rgbToColorref };
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
declare class HWPXError extends Error {
|
|
427
|
+
constructor(message: string);
|
|
428
|
+
}
|
|
429
|
+
declare class HWPXValidationError extends HWPXError {
|
|
430
|
+
readonly field: string;
|
|
431
|
+
constructor(field: string, message: string);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* HWPXDocument를 .hwpx 바이너리(Uint8Array)로 직렬화
|
|
436
|
+
*/
|
|
437
|
+
declare function write(doc: HWPXDocument, opts?: WriteOptions): Uint8Array;
|
|
438
|
+
/**
|
|
439
|
+
* .hwpx 또는 .hwp 바이너리(Uint8Array)를 HWPXDocument로 파싱
|
|
440
|
+
* 포맷 자동 감지 (HWPX ZIP / HWP5 OLE)
|
|
441
|
+
*/
|
|
442
|
+
declare function read(data: Uint8Array, opts?: ReadOptions): HWPXDocument;
|
|
443
|
+
|
|
444
|
+
export { type BinDataItem, type BorderFill, type BorderLine, type BreakRun, type BulletProperty, type CellMerge, type CellPadding, type CharProperty, type ColumnDef, type ColumnSettings, type DocumentHead, type DocumentMeta, type DrawingObject, type DrawingRun, type FillBrush, type FontFace, HWPXBuilder, type HWPXDocument, HWPXError, HWPXValidationError, type HeaderFooterDef, type HeaderFooterOptions, type ImageOptions, type NumberingLevel, type NumberingProperty, type PageMargin, type PageSettings, type ParaProperty, type Paragraph, type Picture, type PictureRun, type ReadOptions, type Run, type Section, type SectionDef, type Style, type StyledSegment, type SubDocument, type Table, type TableCell, type TableOptions, type TableRow, type TableRun, type TextRun, type TextStyleOptions, type WriteOptions, createDefaultBorderFill, createDefaultCharProperty, createDefaultDocument, createDefaultFontFaces, createDefaultHead, createDefaultMeta, createDefaultParaProperty, createDefaultSectionDef, createDefaultStyles, read, index as utils, write };
|