Hello,
We have identified a formatting difference between export to DOCX and PDF when exporting a table with AUTO preferred cell width. Can you please investigate?
Code snippet for the most basic table where this can be reproduced:
Document document = new Document();
DocumentBuilder builder = new DocumentBuilder(document);
//Insert a table
builder.startTable();
Cell cell1 = builder.insertCell();
//Add two strings to the firt cell to highlight the new line difference in export
builder.write("test test");
Cell cell2 = builder.insertCell();
//Add a long string to the second cell that forces new line in the first cell
builder.write("AaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaA");
builder.endRow();
builder.endTable();
//Set preferred width to auto for both cells
cell1.getCellFormat().setPreferredWidth(PreferredWidth.AUTO);
cell2.getCellFormat().setPreferredWidth(PreferredWidth.AUTO);
PDF export:
DOCX export:
Aspose.WORDS version: 24.9
Aspose.PDF version: 22.2