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

Free Support Forum - aspose.com

Alignment of Text display Problem

I want to display a text such that it starts from center (or any defined position) and go to right.
When printed text is long and required new line then new line should start from the Center(or any defined position.if given) and move to right.
How i can do that ? for reference a sample problem is attached.
Thanks in advance.

Thanks for your inquiry. You can try using ParagraphAlignment.

builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;
builder.Writeln("left text");
builder.ParagraphFormat.Alignment = ParagraphAlignment.Right;
builder.Writeln("right text");
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;
builder.Writeln("center text");
Also you can try using LeftIndent.
builder.ParagraphFormat.LeftIndent = 100;

I hope that this will help you.
Best regards.

Thanks a lot.