Hi Team,
I am evaluating your product to use in one of our application. While evaluating I am facing difficulty for the below requirement.
I need the output in the below format with center align
<b>Field Heading:</b> Value
I have tried with FormattedTextArea page element. With this I am able to get "<b>Field Heading:</b> Value" but unable to do center align.
Can you please help me out to solve this problem of mine?
Thanks,
Chinmaya
Apply Bold Font to subset of a string and center align
Re: Apply Bold Font to subset of a string and center align
Support · Sep 9, 2019Hello 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
Re: Apply Bold Font to subset of a string and center align
Forum member · Sep 13, 2019It works like a champ. Thank you very much for the support.