# PdfLogicalTableAnalysis

Shared analysis helpers for logical PDF tables produced by PdfDocumentReadResult.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfLogicalTableAnalysis.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L18)

**Modifiers**

static

Shared analysis helpers for logical PDF tables produced by [PdfDocumentReadResult](/api/pdf/officeimo-pdf-pdfdocumentreadresult/).

## Inheritance

- object
- PdfLogicalTableAnalysis

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Extract Text and Tables from PDF](/docs/pdf/extract-text-tables/) Guide
  
  Extract plain text, page text, Markdown, paragraphs, and tables from existing PDF files with OfficeIMO.Pdf, PSWriteOffice, and the officeimo CLI.

Filter members 

Show inherited

## Methods

`public static PdfLogicalTableStructure Analyze(PdfLogicalTable table)` [#](#method-analyze-officeimo-pdf-pdflogicaltable)

[PdfLogicalTableAnalysis.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L18)

Establishes structured extraction metadata for a logical PDF table from structural evidence.

Parameters

**table OfficeIMO.Pdf.PdfLogicalTable required**

Logical table to inspect.

Returns

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

AnalyzeExtractionScope 4 overloads

`public static PdfTableExtractionScopeReport AnalyzeExtractionScope(PdfDocumentReadResult document)` [#](#method-analyzeextractionscope-officeimo-pdf-pdfdocumentreadresult)

[PdfLogicalTableAnalysis.cs:172](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L172)

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

Parameters

**document OfficeIMO.Pdf.PdfDocumentReadResult required**

Logical PDF document to inspect.

Returns

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

Exceptions

- `InvalidOperationException` – An optional image, widget, or visual primitive projection was not inspected.

`public static PdfTableExtractionScopeReport AnalyzeExtractionScope(PdfDocumentReadResult document, int maximumComparisons)` [#](#method-analyzeextractionscope-officeimo-pdf-pdfdocumentreadresult-int32)

[PdfLogicalTableAnalysis.cs:182](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L182)

Describes table extraction scope while bounding attacker-controlled text/table comparisons.

Parameters

**document OfficeIMO.Pdf.PdfDocumentReadResult required**

**maximumComparisons int required**

Returns

`PdfTableExtractionScopeReport`

Exceptions

- `InvalidOperationException` – An optional image, widget, or visual primitive projection was not inspected.

`public static PdfTableExtractionScopeReport AnalyzeExtractionScope(IReadOnlyList<PdfLogicalPage> pages)` [#](#method-analyzeextractionscope-collections-generic-ireadonlylist-officeimo-pdf-pdflogicalpage)

[PdfLogicalTableAnalysis.cs:215](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L215)

Describes table extraction scope for a selected collection of logical pages. Page-level optional-content usage is reported even when document-level group metadata is unavailable.

Parameters

**pages System.Collections.Generic.IReadOnlyList<OfficeIMO.Pdf.PdfLogicalPage> required**

Logical pages to inspect.

Returns

`PdfTableExtractionScopeReport` Page-scoped table counts plus visible and interactive content outside detected tables.

Exceptions

- `InvalidOperationException` – A page's optional image, widget, or visual primitive projection was not inspected.

`public static PdfTableExtractionScopeReport AnalyzeExtractionScope(IReadOnlyList<PdfLogicalPage> pages, int maximumComparisons)` [#](#method-analyzeextractionscope-collections-generic-ireadonlylist-officeimo-pdf-pdflogicalpage-int32)

[PdfLogicalTableAnalysis.cs:226](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L226)

Describes table extraction scope for selected logical pages while bounding attacker-controlled text/table comparisons. Page-level optional-content usage is reported even when document-level group metadata is unavailable.

Parameters

**pages System.Collections.Generic.IReadOnlyList<OfficeIMO.Pdf.PdfLogicalPage> required**

**maximumComparisons int required**

Returns

`PdfTableExtractionScopeReport`

Exceptions

- `InvalidOperationException` – A page's optional image, widget, or visual primitive projection was not inspected.

`public static IReadOnlyList<string>? DetectHeaderColumns(PdfLogicalTable table)` [#](#method-detectheadercolumns-officeimo-pdf-pdflogicaltable)

[PdfLogicalTableAnalysis.cs:365](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L365)

Detects a header row only when the PDF supplies explicit tagged or typographic structure.

Parameters

**table OfficeIMO.Pdf.PdfLogicalTable required**

Logical table to inspect.

Returns

`IReadOnlyList<string>?` Header column names when structural evidence establishes the first row as a header; otherwise null.

DetectNumericColumns 2 overloads

`public static bool[] DetectNumericColumns(PdfLogicalTable table)` [#](#method-detectnumericcolumns-officeimo-pdf-pdflogicaltable)

[PdfLogicalTableAnalysis.cs:568](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L568)

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

Parameters

**table OfficeIMO.Pdf.PdfLogicalTable required**

Logical table to inspect.

Returns

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

`public static bool[] DetectNumericColumns(PdfLogicalTable table, PdfLogicalTableStructure structure)` [#](#method-detectnumericcolumns-officeimo-pdf-pdflogicaltable-officeimo-pdf-pdflogicaltablestructure)

[PdfLogicalTableAnalysis.cs:602](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L602)

Detects numeric body columns using a previously inferred table structure.

Parameters

**table OfficeIMO.Pdf.PdfLogicalTable required**

Logical table to inspect.

**structure OfficeIMO.Pdf.PdfLogicalTableStructure required**

Inferred table structure that provides column count and body-row boundary.

Returns

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

`public static bool[] DetectParsableNumericColumns(PdfLogicalTableData data, CultureInfo? culture = null)` [#](#method-detectparsablenumericcolumns-officeimo-pdf-pdflogicaltabledata-globalization-cultureinfo)

[PdfLogicalTableAnalysis.cs:580](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L580)

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

Parameters

**data OfficeIMO.Pdf.PdfLogicalTableData required**

Extracted logical table data to inspect.

**culture System.Globalization.CultureInfo? = null optional**

Preferred culture for localized numeric text. Invariant parsing is also attempted.

Returns

`bool[]` 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, int maxRows = 0)` [#](#method-extract-officeimo-pdf-pdflogicaltable-int32)

[PdfLogicalTableAnalysis.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L76)

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

Parameters

**table OfficeIMO.Pdf.PdfLogicalTable required**

Logical table to inspect.

**maxRows int = 0 optional**

Maximum number of body rows to return. Values less than or equal to zero return all body rows.

Returns

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

ExtractTables 3 overloads

`public static IReadOnlyList<PdfLogicalTableExtraction> ExtractTables(PdfDocumentReadResult document, int maxRows = 0)` [#](#method-extracttables-officeimo-pdf-pdfdocumentreadresult-int32)

[PdfLogicalTableAnalysis.cs:105](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L105)

Extracts normalized tables from every logical page in document order.

Parameters

**document OfficeIMO.Pdf.PdfDocumentReadResult required**

Logical PDF document to inspect.

**maxRows int = 0 optional**

Maximum number of body rows per table. Values less than or equal to zero return all body rows.

Returns

`IReadOnlyList<PdfLogicalTableExtraction>` Page-aware normalized table extractions.

`public static IReadOnlyList<PdfLogicalTableExtraction> ExtractTables(IReadOnlyList<PdfLogicalPage> pages, int maxRows = 0)` [#](#method-extracttables-collections-generic-ireadonlylist-officeimo-pdf-pdflogicalpage-int32)

[PdfLogicalTableAnalysis.cs:123](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L123)

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

Parameters

**pages System.Collections.Generic.IReadOnlyList<OfficeIMO.Pdf.PdfLogicalPage> required**

Logical pages to inspect.

**maxRows int = 0 optional**

Maximum number of body rows per table. Values less than or equal to zero return all body rows.

Returns

`IReadOnlyList<PdfLogicalTableExtraction>` Page-aware normalized table extractions.

`public static IReadOnlyList<PdfLogicalTableExtraction> ExtractTables(PdfLogicalPage page, int maxRows = 0)` [#](#method-extracttables-officeimo-pdf-pdflogicalpage-int32)

[PdfLogicalTableAnalysis.cs:158](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L158)

Extracts normalized tables from a single logical page.

Parameters

**page OfficeIMO.Pdf.PdfLogicalPage required**

Logical page to inspect.

**maxRows int = 0 optional**

Maximum number of body rows per table. Values less than or equal to zero return all body rows.

Returns

`IReadOnlyList<PdfLogicalTableExtraction>` Normalized table extractions for the page.

`public static IReadOnlyList<IReadOnlyList<string>> GetBodyRows(PdfLogicalTable table, PdfLogicalTableStructure structure, int maxRows = 0)` [#](#method-getbodyrows-officeimo-pdf-pdflogicaltable-officeimo-pdf-pdflogicaltablestructure-int32)

[PdfLogicalTableAnalysis.cs:627](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L627)

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

Parameters

**table OfficeIMO.Pdf.PdfLogicalTable required**

Logical table to inspect.

**structure OfficeIMO.Pdf.PdfLogicalTableStructure required**

Inferred table structure that provides column count and body-row boundary.

**maxRows int = 0 optional**

Maximum number of rows to return. Values less than or equal to zero return all body rows.

Returns

`IReadOnlyList<IReadOnlyList<string>>` Body rows padded or trimmed to the inferred column count.

`public static int GetColumnCount(PdfLogicalTable table)` [#](#method-getcolumncount-officeimo-pdf-pdflogicaltable)

[PdfLogicalTableAnalysis.cs:548](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L548)

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

Parameters

**table OfficeIMO.Pdf.PdfLogicalTable required**

Logical table to inspect.

Returns

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

`public static bool LooksLikeNumericValue(string? text)` [#](#method-lookslikenumericvalue-string)

[PdfLogicalTableAnalysis.cs:722](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L722)

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

Parameters

**text string? required**

Cell text to inspect.

Returns

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

`public static bool TryParseNumericValue(string? text, CultureInfo? culture, out decimal value)` [#](#method-tryparsenumericvalue-string-globalization-cultureinfo-decimal)

[PdfLogicalTableAnalysis.cs:763](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Reading/Logical/PdfLogicalTableAnalysis.cs#L763)

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

Parameters

**text string? required**

Cell text to parse.

**culture System.Globalization.CultureInfo? required**

Preferred culture for localized numeric text. Invariant parsing is also attempted.

**value decimal required**

Parsed decimal value when parsing succeeds.

Returns

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

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:766B9F6B19C2BE97A59CA8D20D43662C09F2B026C3A2CD6184C974C355005660 -->
