Hi
Thanks for your request. Here is a simple example:
// Create empty docuemnt and DocumentBuilder
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert few paragraphs at the beggining of the document
for (int i = 0; i < 20; i++)
builder.Writeln("This is paragraphs for testing");
// Enable "Keep with Next option"
builder.ParagraphFormat.KeepWithNext = true;
// Build some table
builder.CellFormat.Width = 200;
builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = Color.Black;
for (int i = 0; i < 30; i++)
{
for (int j = 0; j < 2; j++)
{
builder.InsertCell();
builder.Write("This is test content of the table");
}
builder.EndRow();
}
builder.EndTable();
// Save output document
doc.Save(@"Test001\out.doc");
Hope this helps.
Best regards.
Alexey Noskov
Developer/Technical Support
Aspose Auckland Team