public static void SetTableCellFormatting(string dataDir)
{
// ExStart:DocumentBuilderSetTableCellFormatting
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();
dataDir = dataDir + "DocumentBuilderSetTableCellFormatting_out.doc";
doc.Save(dataDir);
// ExEnd:DocumentBuilderSetTableCellFormatting
Console.WriteLine("\nTable cell formatting using DocumentBuilder set successfully.\nFile saved at " + dataDir);
}
public static void SetTableRowFormatting(string dataDir)