Hello,
I have issue with exporting table with Repeat Header Row functionality. Received DOCX and PDF differs a lot, Word as expected ignores this prop when header will be bigger then one page (so as result we have two pages), PDF from the other hand tries to respects this props and generate 12 pages.
Here are example files:
pdf (29.1 KB)
docx (7.8 KB)
And here is code which is used to generate these files:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
var table = builder.startTable();
builder.insertCell();
builder.getCellFormat().setWrapText(true);
for (int t = 0; t < 1000; t++)
builder.write("aaaaaa ");
builder.insertCell();
builder.insertCell();
builder.insertCell();
builder.getRowFormat().setHeadingFormat(true);
builder.getRowFormat().setAllowBreakAcrossPages(true);
builder.endRow();
for (int rows = 0; rows < 10; rows++) {
builder.getRowFormat().setHeadingFormat(false);
builder.getRowFormat().setAllowBreakAcrossPages(true);
builder.insertCell();
builder.insertCell();
builder.insertCell();
builder.insertCell();
builder.endRow();
}
builder.endTable();
table.setAllowAutoFit(true);
Can you help how to force PDF to behave like Word?