Interface MlTableExtractor


public interface MlTableExtractor
Optional machine-learning table extraction strategy used by hybrid parsing.

The core module owns only this lightweight contract. Implementations may live in an optional module and use ONNX Runtime or another local inference engine without adding ML dependencies to extractpdf4j-core.

  • Method Summary

    Modifier and Type
    Method
    Description
    extract(String filepath, String pages)
    Extracts tables from a PDF file.
    extract(org.apache.pdfbox.pdmodel.PDDocument document, String pages)
    Extracts tables from an in-memory PDF document.
  • Method Details

    • extract

      List<Table> extract(String filepath, String pages) throws IOException
      Extracts tables from a PDF file.
      Parameters:
      filepath - PDF path
      pages - page selection using ExtractPDF4J syntax
      Returns:
      extracted tables, never null
      Throws:
      IOException - when the document or model cannot be processed
    • extract

      List<Table> extract(org.apache.pdfbox.pdmodel.PDDocument document, String pages) throws IOException
      Extracts tables from an in-memory PDF document.
      Parameters:
      document - open PDFBox document owned by the caller
      pages - page selection using ExtractPDF4J syntax
      Returns:
      extracted tables, never null
      Throws:
      IOException - when the document or model cannot be processed