Aspose Word incorrect flow - Keep with next not applied by Aspose.Words

Hi,

please look at the attached Word and PDF files. The first row and first cell of the second table has a paragraph set to “Keep with next”. When open in Word, the table row is correctly pushed to the second page with the rest of the table.

Aspose.Words incorrectly keeps this table row at the bottom of the previous page, ignoring the Keep with next attribute.

Note that in MS Word, the rules is that if the paragraph located in the first column (first cell) of a table row is set to Keep with next, then the table row should stick with the following row, which is not correcty applied by Aspose.Words in this case.

Our document management system and report generation engine carefully sets these “keep with next” properties, it is key that our tables flow as defined when PDFs are generated for going to print.Problem - Aspose Words incorrect flow - Keep with Next.zip (53.8 KB)

@andrelafond,

The problem occurs because you are using an old 20.2 version of Aspose.Words for .NET on your end. After an initial test with the licensed latest (21.1) version of Aspose.Words for .NET, we were unable to reproduce this issue on our end. Please see the following output PDF file generated on our end:

Attachment: DOC to PDF using Aspose.Words 21.1.pdf (33.0 KB)

C# code we used on our end is:

Document doc = new Document("C:\\Temp\\Test - AsposeKeepWithNext - WORD FILE.doc");
doc.Save(@"C:\Temp\\21.1.pdf");

So, we suggest you to please upgrade to the latest version of Aspose.Words for .NET.