Html Symbols

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v6)  /  Html Symbols

DynamicPDF CoreSuite for .NET (v6) Forum

 May 03 2012 5:16 PM
Is there a way to get html entity-symbols to work within formattedtextarea.

Like for example the sum-sign:
utf8: ?
(this works)

entityno: ∑
(this does not work)

entityname: ∑
(neither does this)
 May 04 2012 5:28 AM
Posted by a ceTe Software moderator
Hello,

You can add summation symbol to the PDF using FormattedTextArea page element. You will need to use the exact Unicode value for the symbol which you would like to add and also you will need to make sure that that symbol is supported by the font which you are using. Below is the sample code to add the summation symbol using Unicode value.

            Document document = new Document();
            Page page = new Page();
            OpenTypeFont font = new OpenTypeFont(@"ARIALUNI.TTF");
            FontFamily family = new FontFamily("ArialFont",font);
            //Adding summation symbol using Unicode(u2211) value.
            string myText = "<p>\u2211  Summation symbol using Unicode</p> ";
            FormattedTextArea area = new FormattedTextArea(myText, 100, 100, 200, 200, family, 14, true);
            page.Elements.Add(area);
            document.Pages.Add(page);
            document.Draw(@"C:\MyDocument.pdf");

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 5:28 AM.