Current row formatting is determined by a RowFormat object that is returned by the DocumentBuilder.RowFormat property. The object encapsulates information about all table row formatting.
Example DocumentBuilderSetRowFormatting
Shows how to create a table that contains a single cell and apply row formatting.
[C#]
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.StartTable();
builder.InsertCell();
// Set the row formatting
RowFormat rowFormat = builder.RowFormat;
rowFormat.Height = 100;
rowFormat.HeightRule = HeightRule.Exactly;
rowFormat.LeftPadding = 30;
rowFormat.RightPadding = 30;
rowFormat.TopPadding = 30;
rowFormat.BottomPadding = 30;
builder.Writeln("I'm a wonderful formatted row.");
builder.EndRow();
builder.EndTable();
[Visual Basic]
Dim doc As Document = New Document()
Dim builder As DocumentBuilder = New DocumentBuilder(doc)
builder.StartTable()
builder.InsertCell()
' Set the row formatting
Dim rowFormat As RowFormat = builder.RowFormat
rowFormat.Height = 100
rowFormat.HeightRule = HeightRule.Exactly
rowFormat.LeftPadding = 30
rowFormat.RightPadding = 30
rowFormat.TopPadding = 30
rowFormat.BottomPadding = 30
builder.Writeln("I'm a wonderful formatted row.")
builder.EndRow()
builder.EndTable()
[Java]
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.startTable();
builder.insertCell();
// Set the row formatting
RowFormat rowFormat = builder.getRowFormat();
rowFormat.setHeight(100);
rowFormat.setHeightRule(HeightRule.EXACTLY);
rowFormat.setLeftPadding(30);
rowFormat.setRightPadding(30);
rowFormat.setTopPadding(30);
rowFormat.setBottomPadding(30);
builder.writeln("I'm a wonderful formatted row.");
builder.endRow();
builder.endTable();