PdfTable.SetColumnWidth Method

PDF File Writer

PdfTableSetColumnWidth Method

Sets the number of columns, and column's widths.

Namespace:  PdfFileWriter
Assembly:  PdfFileWriter (in PdfFileWriter.dll) Version: 1.1.24.0 (1.1.24.0)
Syntax
C#
public void SetColumnWidth(
	params double[] ColumnWidth
)

Parameters

ColumnWidth
Type: SystemDouble
Array of column widths.
Remarks

The length of the array sets the number of columns.

This method builds two PdfTableCell arrays. One array for data cells, and the other array for header cells.

The actual column widths will be calculated to fit the width of the table.

The calculation is done as follows. First the library calculates the amount of net space available after border lines and grid lines width is taken off the width of the table as specified in TableArea. Second, the net space is divided in proportion to the requested widths.

See Also