Text-wrapping specification is not honored in cells when converted from doc to pdf

Hello,

We have a document (attached) in which we on bottom of page 4 (§11), going over to page 5, have cells in the left side (numbered list) that are specified to not wrap text. This is honored in Word, but is not honored in the PDF-version, which is also attached.

Note that point 10 to 14 has wrapped text in the left column, something point 1 to 9 does not have.

Version: 10.2.0 for Java.
Error reproduced on: Ubuntu and Red Hat Linux.
Example code:

Cell c = builder.insertCell();
c.getCellFormat().setWidth(numberedWidth);
c.getCellFormat().setPreferredWidth(PreferredWidth.fromPoints(c.getCellFormat().getWidth()));
c.getCellFormat().setWrapText(false);
c.getCellFormat().setRightPadding(4);

I also tried adding the following with no change in behavior:

c.getCellFormat().setFitText(true);

Hi Tor,

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

Please use following code as a workaround of this issue. Hope this helps you.

Document doc = new Document(MyDir + "nlo_lov_1821-06-26.doc");
for (Table table : (Iterable)doc.getChildNodes(NodeType.TABLE, true))
{
    if (table.getRows().getCount() == 1)
    {
        table.getFirstRow().getFirstCell().getCellFormat().setWidth(20);
    }
}
doc.save(MyDir + "Out.pdf");

Hi,

Thank you for the update and the example code!

Hi Tor,

Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

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