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

Free Support Forum - aspose.com

Insert Space btween two Paragraph

Hi,
Please suggest me code for giving space between two pragraph, please see below code that disaplying text and after this from next new line i am dispalying table and i need space between text and table

builder.write("Title text");
builder.getCurrentParagraph().getParagraphFormat()
.setAlignment(ParagraphAlignment.*CENTER*);
builder.insertParagraph(); 

after that my code

buisder.startTable()

between this i need space
Thanks
Rajendra

Hi Rajendra,

Thanks for your inquiry. Please use ParagraphFormat.SpaceAfter property to get or set the amount of spacing (in points) after the paragraph. I suggest you please read following documentation link. Hope this helps you.
https://docs.aspose.com/words/java/programming-with-documents/

Please check following highlighted code snippet for your kind reference.

builder.write("Title text");
builder.getCurrentParagraph().getParagraphFormat().setAlignment(ParagraphAlignment.*CENTER*);
Paragraph para = builder.insertParagraph(); 
para.getParagraphFormat().setSpaceAfter(50);