file2md
Version:
A TypeScript library for converting various document types (PDF, DOCX, XLSX, PPTX, HWP, HWPX) into Markdown with image and layout preservation
20 lines • 859 B
TypeScript
import { Buffer } from 'node:buffer';
import type { ImageExtractor } from '../utils/image-extractor.js';
import type { ChartExtractor } from '../utils/chart-extractor.js';
import type { ImageData, ChartData } from '../types/interfaces.js';
export interface HwpParseOptions {
readonly preserveLayout?: boolean;
readonly extractImages?: boolean;
readonly extractCharts?: boolean;
}
export interface HwpParseResult {
readonly markdown: string;
readonly images: readonly ImageData[];
readonly charts: readonly ChartData[];
readonly metadata: Record<string, unknown>;
}
/**
* Parse HWP or HWPX buffer and convert to markdown
*/
export declare function parseHwp(buffer: Buffer, imageExtractor: ImageExtractor, chartExtractor: ChartExtractor, options?: HwpParseOptions): Promise<HwpParseResult>;
//# sourceMappingURL=hwp-parser.d.ts.map