Hello
Thanks for your inquiry.
1. Could you please provide me the code
which will allow me to reproduce the problem on my side?
2. Regarding how to avoid tables splitting
across the page, please try setting the ParagraphFormat.KeepWithNext property
for each paragraph inside the table. This will cause the entire table to keep
together across a page break.
3. In this case
you should use HeadingFormat property.
Please see the following code for example:
//Create document and DocumentBuilder
Document doc = new
Document();
DocumentBuilder builder = new
DocumentBuilder(doc);
//Create heading row that will be repeated on each page
builder.RowFormat.HeadingFormat = true;
builder.Bold
= true;
for (int
i = 0; i < 5; i++)
{
builder.InsertCell();
builder.Write(string.Format("heading_{0}", i));
}
builder.EndRow();
builder.RowFormat.HeadingFormat = false;
builder.Bold
= false;
//Generate body of table
for (int
rowIdx = 0; rowIdx < 100; rowIdx++)
{
for (int colIdx = 0; colIdx < 5; colIdx++)
{
builder.InsertCell();
builder.Write(string.Format("value_of_{0}_{1}", rowIdx, colIdx));
}
builder.EndRow();
}
builder.EndTable();
//Save output document
doc.Save("out.doc");
I think it
should be easy for you to translate this code to Java. Please let me know in
case of any issues.
I hope this could help you.
Best regards,