We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Words for .Net wraps narrow table cells containing trailing spaces

If a narrow table cell contains trailing spaces, Word 2016 ignores them and renders the cell on a single line. Aspose.Words for .Net wraps the cell to 2 lines, thereby rendering a very different lay-out than Word does.
PDF created by Aspose.Words for .Net.pdf (64.5 KB)
PDF created by Microsoft Word.pdf (82.4 KB)

Please find attached a zip file containing a sample document, the PDF created by Word and same PDF created using Aspose.Words for .Net. I tried latest Aspose.Words version (18.3) and the issue still exists in this version. I also tried various document.CompatibilityOptions flagsDocxToPdf conversion sample with table data.zip (135.3 KB)
and none of them seemed to have a positive effect.

As a work-around, we can trim spaces from the last run in each paragraph of each cell in the document (and remove the run if it contains only spaces), but that is quite some code and presumably slow for large documents.

@gertjaap,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-16550. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-16550) have been fixed in this Aspose.Words for .NET 18.5 update and this Aspose.Words for Java 18.5 update.