Hello,
While trying newer versions of Aspose.Words for Java, I noticed a change in the behavior of tab stops. In version 24.10, the table becomes distorted after adding a tab stop.
Could you please confirm whether this is a bug in Aspose?
Code snippet:
Document doc = new Document(new FileInputStream("C:\\work\\table.docx"));
Table table = (Table) doc.getChild(NodeType.TABLE, 0, true);
Cell cell = table.getRows().get(2).getCells().get(0);
cell.getCellFormat().setPreferredWidth(PreferredWidth.AUTO);
cell.getLastParagraph().appendChild(new Run(doc, ControlChar.TAB));
cell.getLastParagraph().getParagraphFormat().getTabStops().add(
700,
TabAlignment.RIGHT,
TabLeader.DOTS
);
doc.save("C:\\work\\new.pdf");
Word file:
table.docx (14.9 KB)
Difference between versions: