How to set paragraph alignment in table's cell using Java

Hi,

I use Aspose.Words for Java, I found Aspose support Paragraph alignment justify , but table cell doesn’t support this. MS Word support alignment in Paragraph and Table.

You can check Aspose API, and can find that the API doesn’t expose table cell alignment justify.
https://reference.aspose.com/java/words/com.aspose.words/ParagraphAlignment

Hi Feng,

Thanks for your query. Please use the following code snippet to set Justify alignment in a cell. Hope this Helps you. Let us know, If you have any more queries.

builder.insertCell();

builder.getCellFormat().setVerticalAlignment(CellVerticalAlignment.CENTER);

builder.getParagraphFormat().setAlignment(ParagraphAlignment.JUSTIFY);

builder.write("Text in one cell.");