DynaPDF.Table.AddColumn
-----------------------

Adds a column on the left or right side of the table.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [3.5](newinversion35.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.Table.AddColumn"; Table; Left; Width ) 

**MBS**( **"DynaPDF.Table.AddColumn";** /\* Adds a column on the left or right side of the table. \*/  
**$Table**; /\* The identifier for the table. \*/   
**$Left**; /\* Add the column on the left or right side?e.g. 0 \*/   
**$Width**) /\* The new column width.e.g. 100 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Table | The identifier for the table. | $Table |
| Left | Add the column on the left or right side? | 0 |
| Width | The new column width. | 100 |

### Result

Returns number of columns or error.

### Description

Adds a column on the left or right side of the table.   
In most cases it is required to change the table width and the widths of the remaining columns after a new column was added. This can be done with [DynaPDF.Table.SetTableWidth](DynaPDFTableSetTableWidth.md) and [DynaPDF.Table.SetColWidth](DynaPDFTableSetColWidth.md).  
If possible, create the table directly with the required number of columns.  
  
If the function succeeds, the return value is new number of columns. If the function fails, the return value is a negative error code.  
  
### See also

- [DynaPDF.Table.AddRow](DynaPDFTableAddRow.md)
- [DynaPDF.Table.AddRows](DynaPDFTableAddRows.md)
- [DynaPDF.Table.ClearColumn](DynaPDFTableClearColumn.md)
- [DynaPDF.Table.SetColor](DynaPDFTableSetColor.md)
- [DynaPDF.Table.SetColWidth](DynaPDFTableSetColWidth.md)
- [DynaPDF.Table.SetTableWidth](DynaPDFTableSetTableWidth.md)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[DynaPDF.SysFontInfoAsJSON](DynaPDFSysFontInfoAsJSON.md) - [DynaPDF.Table.AddRow](DynaPDFTableAddRow.md)

[HTML Version](DynaPDFTableAddColumn.shtml)