public void DocumentBuilderSetCellFormatting()
{
//ExStart
//ExFor:DocumentBuilder.CellFormat
//ExFor:CellFormat.Width
//ExFor:CellFormat.LeftPadding
//ExFor:CellFormat.RightPadding
//ExFor:CellFormat.TopPadding
//ExFor:CellFormat.BottomPadding
//ExFor:DocumentBuilder.StartTable
//ExFor:DocumentBuilder.EndTable
//ExId:DocumentBuilderSetCellFormatting
//ExSummary:Shows how to create a table that contains a single formatted cell.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.StartTable();
builder.InsertCell();
// Set the cell formatting
CellFormat cellFormat = builder.CellFormat;
cellFormat.Width = 250;
cellFormat.LeftPadding = 30;
cellFormat.RightPadding = 30;
cellFormat.TopPadding = 30;
cellFormat.BottomPadding = 30;
builder.Writeln("I'm a wonderful formatted cell.");
builder.EndRow();
builder.EndTable();
//ExEnd
}