API referenceReporting

tblGetNumCols

Plain, real dimension/count introspection.

C
int32_t __stdcall tblGetNumCols(ITBL Table);
int32_t __stdcall tblGetNumRows(ITBL Table);
float __stdcall tblGetTableHeight(ITBL Table);
float __stdcall tblGetTableWidth(ITBL Table);
Delphi
function tblGetNumCols(const Table: ITBL): Integer; stdcall;
function tblGetNumRows(const Table: ITBL): Integer; stdcall;
function tblGetTableHeight(const Table: ITBL): Single; stdcall;
function tblGetTableWidth(const Table: ITBL): Single; stdcall;

Purpose. Plain, real dimension/count introspection.

Description. tblGetNumCols/tblGetNumRows are direct field reads (NumCols, Rows.Count). tblGetTableHeight/tblGetTableWidth are computed sums, not stored fields — TableHeight sums every entry in RowH; TableWidth sums every entry in ColW — recomputed fresh on every call, always reflecting the true current row/column state (never stale, unlike tblGetPDFInstance's disconnected round-trip, Lifecycle, Rows, Columns, and PDF Binding). Note: tblGetTableWidth reflects the sum of actual column widths — not the Width field tblSetTableWidth sets, which (per Colors, Fonts, Flags, Grid Lines, and Dimensions's finding) is a separate, disconnected value with no column-redistribution logic; calling tblSetTableWidth therefore does not change what tblGetTableWidth subsequently reports.

Parameters.

ParameterDescription
TableTarget table handle.

Return value. The respective count/dimension; 0/0.0 if Table doesn't resolve.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int tblGetNumCols(IntPtr Table);
Area
Reporting
Category

Misc

Exported names

tblGetNumCols

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.