Header and footer empty page problem

Can u support me to understand why i get empty page at the end. Looks like i’m calculating height of the content wrong

hpf_t_4 (9).zip (38.9 KB)

@bloodboilAaromatic It looks like the problem occurs because height of the row specified in your document is too big. Why do not you let the table row grow with the content, i.e. do not set table height explicitly?
modified.docx (46.4 KB)

1 Like

Yeah, that true, that done not by me but i see exact rows that are doing so.

row.RowFormat.Height = blocksGridCellSize.Height * (endY - startY);
row.RowFormat.HeightRule = HeightRule.AtLeast;

And this rows:

contentRow.RowFormat.Height = contentSize.Height;
contentRow.RowFormat.HeightRule = HeightRule.AtLeast;

@bloodboilAaromatic So the issue is not in Aspose.Words but in the incorrectly calculated space available on the page.