Posted by a ceTe Software moderator
Hello Chinmaya,
Yes, you can center align the text in the FormattedTextArea by setting the Align property of the paragraph style and VAlign property of the FormattedTextArea. Below is the code sample.
Document document = new Document();
Page page = new Page();
string text = "<b>Field Heading:</b>";
FormattedTextArea fta = new FormattedTextArea(text, 0, 0, 100, 30, FontFamily.Helvetica, 14, true);
fta.Style.Paragraph.Align = TextAlign.Center;
fta.VAlign = VAlign.Center;
page.Elements.Add(fta);
document.Pages.Add(page);
document.Draw(@"C:\Temp\TestFTA.pdf");
Thanks,
ceTe Software Support Team