Skip to content
DemoFAQ

表格识别

概述

表格识别重建版面分析检测到的表格内部结构(行、列、合并单元格),使转换文档保留原始表格语义。由 EnableAiTableRecognition 选项控制,默认启用。

受益场景:无边框表格、合并单元格表格、OCR 扫描表格。支持 Word、Excel、PowerPoint、HTML、RTF、CSV、JSON、Markdown 格式。

表格识别仅在版面分析活跃时运行。使用前需加载 DocumentAI 模型,或通过下方回调章节插入自己的表格模型。

csharp
LibraryManager.SetDocumentAIModel("path/documentai_v4.model");

WordOptions options = new WordOptions();
options.EnableAiLayout = true;
options.EnableAiTableRecognition = true;
CPDFConversion.StartPDFToWord("input.pdf", "", "output.docx", options);