API Reference

Class

PdfLogicalTableAnalysis

Namespace OfficeIMO.Pdf
Assembly OfficeIMO.Pdf
Modifiers static

Shared analysis helpers for logical PDF tables produced by PdfLogicalDocument.

Inheritance

  • Object
  • PdfLogicalTableAnalysis

Methods

public static PdfLogicalTableStructure Analyze(PdfLogicalTable table) #
Returns: PdfLogicalTableStructure

Infers structured extraction metadata for a logical PDF table.

Parameters

table OfficeIMO.Pdf.PdfLogicalTable requiredposition: 0
Logical table to inspect.

Returns

Column names, body-row boundary, and table-shape flags for structured consumers.

public static PdfTableExtractionScopeReport AnalyzeExtractionScope(PdfLogicalDocument document) #
Returns: PdfTableExtractionScopeReport

Describes the source-page content considered by table-only adapters.

Parameters

document OfficeIMO.Pdf.PdfLogicalDocument requiredposition: 0
Logical PDF document to inspect.

Returns

Table counts plus visible and interactive page content that a table-only adapter will not import.

public static IReadOnlyList<String> DetectHeaderColumns(PdfLogicalTable table) #
Returns: IReadOnlyList<String>

Detects a simple header row from the first logical table row.

Parameters

table OfficeIMO.Pdf.PdfLogicalTable requiredposition: 0
Logical table to inspect.

Returns

Header column names when the first row looks like distinct text headers; otherwise null.

DetectNumericColumns 2 overloads
public static Boolean[] DetectNumericColumns(PdfLogicalTable table) #
Returns: Boolean[]

Detects body columns whose non-empty cells look numeric and can be right-aligned by text emitters.

Parameters

table OfficeIMO.Pdf.PdfLogicalTable requiredposition: 0
Logical table to inspect.

Returns

A Boolean value per visible table column. True means all non-empty body cells in that column look numeric.

public static Boolean[] DetectNumericColumns(PdfLogicalTable table, PdfLogicalTableStructure structure) #
Returns: Boolean[]

Detects numeric body columns using a previously inferred table structure.

Parameters

table OfficeIMO.Pdf.PdfLogicalTable requiredposition: 0
Logical table to inspect.
structure OfficeIMO.Pdf.PdfLogicalTableStructure requiredposition: 1
Inferred table structure that provides column count and body-row boundary.

Returns

A Boolean value per visible table column. True means all non-empty body cells in that column look numeric.

public static Boolean[] DetectParsableNumericColumns(PdfLogicalTableData data, CultureInfo culture = null) #
Returns: Boolean[]

Detects extracted logical table columns whose non-empty cells can be safely converted to decimal values.

Parameters

data OfficeIMO.Pdf.PdfLogicalTableData requiredposition: 0
Extracted logical table data to inspect.
culture System.Globalization.CultureInfo = null optionalposition: 1
Preferred culture for localized numeric text. Invariant parsing is also attempted.

Returns

A Boolean value per extracted table column. True means every non-empty cell in that column parses as a decimal value.

public static PdfLogicalTableData Extract(PdfLogicalTable table, Int32 maxRows = 0) #
Returns: PdfLogicalTableData

Extracts a normalized, structured table view for document readers and text emitters.

Parameters

table OfficeIMO.Pdf.PdfLogicalTable requiredposition: 0
Logical table to inspect.
maxRows System.Int32 = 0 optionalposition: 1
Maximum number of body rows to return. Values less than or equal to zero return all body rows.

Returns

Inferred columns, normalized body rows, numeric-column flags, and truncation metadata.

ExtractTables 3 overloads
public static IReadOnlyList<PdfLogicalTableExtraction> ExtractTables(PdfLogicalDocument document, Int32 maxRows = 0) #
Returns: IReadOnlyList<PdfLogicalTableExtraction>

Extracts normalized tables from every logical page in document order.

Parameters

document OfficeIMO.Pdf.PdfLogicalDocument requiredposition: 0
Logical PDF document to inspect.
maxRows System.Int32 = 0 optionalposition: 1
Maximum number of body rows per table. Values less than or equal to zero return all body rows.

Returns

Page-aware normalized table extractions.

public static IReadOnlyList<PdfLogicalTableExtraction> ExtractTables(IReadOnlyList<PdfLogicalPage> pages, Int32 maxRows = 0) #
Returns: IReadOnlyList<PdfLogicalTableExtraction>

Extracts normalized tables from the supplied logical pages in their current order.

Parameters

pages System.Collections.Generic.IReadOnlyList{OfficeIMO.Pdf.PdfLogicalPage} requiredposition: 0
Logical pages to inspect.
maxRows System.Int32 = 0 optionalposition: 1
Maximum number of body rows per table. Values less than or equal to zero return all body rows.

Returns

Page-aware normalized table extractions.

public static IReadOnlyList<PdfLogicalTableExtraction> ExtractTables(PdfLogicalPage page, Int32 maxRows = 0) #
Returns: IReadOnlyList<PdfLogicalTableExtraction>

Extracts normalized tables from a single logical page.

Parameters

page OfficeIMO.Pdf.PdfLogicalPage requiredposition: 0
Logical page to inspect.
maxRows System.Int32 = 0 optionalposition: 1
Maximum number of body rows per table. Values less than or equal to zero return all body rows.

Returns

Normalized table extractions for the page.

public static IReadOnlyList<IReadOnlyList<String>> GetBodyRows(PdfLogicalTable table, PdfLogicalTableStructure structure, Int32 maxRows = 0) #
Returns: IReadOnlyList<IReadOnlyList<String>>

Returns normalized logical body rows using a previously inferred table structure.

Parameters

table OfficeIMO.Pdf.PdfLogicalTable requiredposition: 0
Logical table to inspect.
structure OfficeIMO.Pdf.PdfLogicalTableStructure requiredposition: 1
Inferred table structure that provides column count and body-row boundary.
maxRows System.Int32 = 0 optionalposition: 2
Maximum number of rows to return. Values less than or equal to zero return all body rows.

Returns

Body rows padded or trimmed to the inferred column count.

public static Int32 GetColumnCount(PdfLogicalTable table) #
Returns: Int32

Gets the maximum visible cell count across all logical table rows.

Parameters

table OfficeIMO.Pdf.PdfLogicalTable requiredposition: 0
Logical table to inspect.

Returns

The maximum row width, or zero when the table has no visible cells.

public static Boolean LooksLikeKeyValueTable(PdfLogicalTable table) #
Returns: Boolean

Reports whether a two-column logical table looks like label/value facts instead of a general data grid.

Parameters

table OfficeIMO.Pdf.PdfLogicalTable requiredposition: 0
Logical table to inspect.

Returns

True when the table has two visible columns and body rows look like non-numeric labels with values.

public static Boolean LooksLikeNumericValue(String text) #
Returns: Boolean

Reports whether a table cell value looks numeric for Markdown and HTML alignment purposes.

Parameters

text System.String requiredposition: 0
Cell text to inspect.

Returns

True when the value contains at least one digit and only numeric punctuation, whitespace, or currency symbols.

public static Boolean TryParseNumericValue(String text, CultureInfo culture, out Decimal value) #
Returns: Boolean

Parses common invoice and statement numeric cell text into a decimal value for editable document exports.

Parameters

text System.String requiredposition: 0
Cell text to parse.
culture System.Globalization.CultureInfo requiredposition: 1
Preferred culture for localized numeric text. Invariant parsing is also attempted.
value System.Decimal@ requiredposition: 2
Parsed decimal value when parsing succeeds.

Returns

True when the text can be converted to a decimal value without treating percentages as ordinary numbers.