I have a requirement to create a dynamic PDF using the SimSun font within a FormattedTextArea(fta) page element. I am adding the font family I created to the FontFaces collection of the fta, just I have for all the other fonts I have previously worked with. However, the output remains in English (actual font face is unknown). The fta text is as follows:
<font face='SimSun'>Test</font>
I know that I have everything setup exactly like my other fonts, and I have had success with other foreign fonts. Has anyone had any experience dealing with this font? Is there something special I have to do in order for it to render correctly?
Thanks,
Matt
SimSun
Re: SimSun
Support · May 29, 2008Hello Matt,
If you are seeing the english text means the font you are using supports displaying the english. Please make sure that you are using a font which will show your desired text.
Following is the sample code in order to use the font faces.
Document document = new Document();
Page page = new Page();
string strHtmlText = "<font face='SimSun'>ceTe</font> Support";
TrueTypeFont sim = new TrueTypeFont("simsun.ttf");
FontFamily simsun = new FontFamily("SimSun", sim);
FormattedTextArea area = new FormattedTextArea(strHtmlText, 10, 10, 215, 200, FontFamily.Times, 12, true);
area.FontFaces.Add(simsun);
page.Elements.Add(area);
document.Pages.Add(page);
document.DrawToWeb();
Thanks,
ceTe Software Support Team.