PdfElixide.Document.Table (pdf_elixide v0.7.0)

Copy Markdown View Source

A table detected on a PDF page, with its zero-based page index, bounding box, and rows.

Tables are detected by a spatial algorithm rather than read from explicit markup, so a detection is a best guess. The :real_grid? flag reports whether the detection looks like a genuine data grid (at least two rows and columns, consistently populated) as opposed to a form layout or a label-colon-value list; filter on it when false positives matter:

Enum.filter(tables, & &1.real_grid?)

:bbox is nil when the detector could not determine the table's extent.

Summary

Types

t()

@type t() :: %PdfElixide.Document.Table{
  bbox: PdfElixide.Geometry.Rect.t() | nil,
  col_count: non_neg_integer(),
  has_header?: boolean(),
  page: non_neg_integer(),
  real_grid?: boolean(),
  rows: [PdfElixide.Document.Table.Row.t()]
}