Automatic Cell span Issue with Aspose

Hi Team,

I am seeing a change in table output with changes in the version of Aspose library. The old library Aspose 13.5 shows some sort of automatic cell span happening whereas its not the case with the new library Aspose 15.6 . The change is visible in both doc and pdf output. Are there any known issue around this or is there any new setting that needs to be done.
Please see the standalone code and output generated.

Thanks,
Akash

private static void buildTable(DocumentBuilder docBuilder) throws Exception
{
docBuilder.startTable();

Cell mainCell1 = docBuilder.insertCell();
mainCell1.getCellFormat().setPreferredWidth(PreferredWidth.fromPoints(80));
// first inner table
docBuilder.startTable();

Cell it1_cell1 = docBuilder.insertCell();

it1_cell1.getCellFormat().setWidth(65.0);
mainCell1.getCellFormat().setPreferredWidth(PreferredWidth.fromPoints(65.0));

docBuilder.write(“Text”);

Table innerTable1 = docBuilder.endTable();
innerTable1.setPreferredWidth(PreferredWidth.AUTO);
innerTable1.setAllowAutoFit(true);

Cell mainCell2 = docBuilder.insertCell();

// second inner table
docBuilder.startTable();
docBuilder.getParagraphFormat().clearFormatting();

Cell it2_r1_cell1 = docBuilder.insertCell();
docBuilder.write(“Cell A1”);

Cell it2_r1_cell2 = docBuilder.insertCell();
docBuilder.write(“Cell B1”);

Cell it2_r1_cell3 = docBuilder.insertCell();
docBuilder.write(“Cell C1”);

docBuilder.endRow();

Cell it2_r2_cell1 = docBuilder.insertCell();
docBuilder.write(“A2”);

Cell it2_r2_cell2 = docBuilder.insertCell();
docBuilder.write(“B2”);

Cell it2_r2_cell3 = docBuilder.insertCell();
docBuilder.write(“C2”);

Cell it2_r2_cell4 = docBuilder.insertCell();
docBuilder.write(“D2”);
docBuilder.endRow();

Table inner_table2 = docBuilder.endTable();
inner_table2.setPreferredWidth(PreferredWidth.fromPercent(100));
inner_table2.setAllowAutoFit(false);



Cell mainCell3 = docBuilder.insertCell();
docBuilder.write(“Development Data”);

Table mainTable = docBuilder.endTable();

mainTable.setPreferredWidth(PreferredWidth.fromPercent(100));
mainCell2.getCellFormat().setPreferredWidth(PreferredWidth.fromPoints(350));
mainTable.setAllowAutoFit(true);
}

Hi Akash,


Thanks for your inquiry. After an initial test with Aspose.Words for Java 16.3.0, I was unable to reproduce this issue on my side (please see attached DOCX/PDF). I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link. I hope, this helps.

Best regards,