Skip to content
ComPDF

Table Recognition

Overview

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.

Use enable_ai_table_recognition to enable table recognition.

Sample

ruby
ComPDFKitConversion::LibraryManager.set_document_ai_model("/path/to/documentai.model", -1)

options = ComPDFKitConversion::ConvertOptions.new
options.enable_ai_table_recognition = true

result = ComPDFKitConversion::Conversion.start_pdf_to_excel(
  input_file_path,
  "",
  output_file_path,
  options
)