PDFium Delphi Component Docs

ValidatePdfUa2TableGrid function

Unit: PDFium
Replays each PDF/UA-2 table into a bounded rectangular grid and reports span, overlap, and gap defects

Syntax

function ValidatePdfUa2TableGrid(const Elements: TPdfStructureElements): TPdfUaValidationIssues;

Parameters

ElementsTPdfStructureElements

Return Value

TPdfUaValidationIssues

Description

ValidatePdfUa2TableGrid locates every Table element and simulates its rows and cells in a rectangular occupancy grid using the ColSpan and RowSpan attributes recorded on the TH and TD elements, with absent spans counting as 1

A TR row belongs to a table when its nearest Table ancestor is that element, so nested tables are validated independently

The table is reported as pvuaiTableGridInvalid when a cell overlaps an occupied grid cell, a span is negative or exceeds the 4096-column bound, a row leaves gaps before its last occupied column, rows have inconsistent widths, a RowSpan is still open past the last row, or the table declares no rows at all

A TH element with a Scope attribute other than Row, Column, or Both is also invalid

A Headers association array that references an ID which no TH element in the document carries makes the table invalid

Remarks

Example

TableIssues := ValidatePdfUa2TableGrid(Pdf.StructureElements);

See Also

ValidatePdfUa2StructureElements, ValidatePdfUa2Containment, ValidatePdfUaStructureElements, TPdf.StructureElements