Table moves to next page when HeadingFormat is set to 'true' using Java

Hi,

I am formatting a word document (contains special word that find and replace) with a table. But when i generate a bigger table, and the page contain some static data above the generating page, then page generating in the next page. It making some many empty space in the generated document. I am attaching my sample code, input and output file(inside resource folder) TblAlgmtIssue.zip (113.4 KB)
. I want the table start in the same position of special word. Please help me to solve this issue.

Thank you

@Gptrnt

Please manually create your expected Word document using Microsoft Word and attach it here for our reference. We will investigate how you want your final Word output be generated like. We will then provide you more information on this along with code.

I am attaching my expected output expected_output.zip (11.9 KB)

@Gptrnt

Please note that Aspose.Words mimics the behavior of MS Word. If you set the ‘Repeat as header row at the top of each page’ option of table using MS Word, you will get the same output.

Please remove the following line of code from your application to get the desired output.

builder.getRowFormat().setHeadingFormat(true);