PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Table Recognition reconstructs the internal structure of tables detected during layout analysis, including rows, columns, merged cells, and cell boundaries, so that the converted document preserves the original tabular semantics instead of producing a flat grid of text fragments.
It is controlled by the independent option enableAiTableRecognition, which is enabled by default. The table model is only invoked for table regions reported by layout analysis whose detection confidence is below the trusted threshold; high-confidence native PDF tables bypass the model to save inference time.
Typical scenarios that benefit from Table Recognition:
Features that support Table Recognition:
enableAiLayout is enabled, or implicitly when enableOcr is enabled).enableAiTableRecognition turns the table model off entirely; detected table regions then fall back to geometric reconstruction from the underlying page objects.This sample demonstrates how to convert a PDF to a Word document with Table Recognition enabled.
LibraryManager.setDocumentAIModel("path/model");
WordOptions opt = new WordOptions();
opt.setEnableAiLayout(true);
opt.setEnableAiTableRecognition(true); // enabled by default in 4.1
CPDFConversion.startPDFToWord("input.pdf", "password", "path/output.docx", opt);