Mail merge splits table between 2 pages

26 views Asked by At

I have a mail merge with a table in the middle of the document. The template looks like this:

enter image description here

Even though I have the Keep with Next and the Keep line together options checked, when the document gets generated, there are instances where the table gets split, as seen here:

enter image description here

In the above picture, you can see that the table contains 2 rows of data: The first row of the table is displayed as File XXXXXXXXXXXXXXX (blacked out on purpose). The secord row of the table contains the bar code and the dollar figures.

You will see, at the end of the first page, the merge ends up placing row 1 data but row 2 data gets placed on the next page.

Any ideas on how to keep row 1 and row 2 of the table together? I am using ASPOSE to execute the mail merge from a C# MVC application.

1

There are 1 answers

0
Alexey Noskov On

Most likely you have set Keep with Next option for all paragraph in these two rows, which should be kept together. After generating document, all paragraph in the table rows have this option set, so all rows are kept together. To void this, try resetting Keep with Next option for the last paragraph or for all paragraph in the last row from these two rows.