We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

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

Hi,

I use Aspose.Words for Java, I found Apose 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://apireference.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.");