Unicode Support

Unicode Support

Forum member · Apr 23, 2009
I am using DynamicPDF generator version DynamicPDF™ v4.0.1 for .NET. My application is required to support the unicode characters. For the same I am using code like below Document _pdfDocument = new Document(); TrueTypeFont verdana = new TrueTypeFont("verdana.ttf"); FontFamily family = new FontFamily("Verdana", verdana); FormattedTextAreaStyle style = new FormattedTextAreaStyle(family, 12, false); FormattedTextArea txtArea = new FormattedTextArea("???? Unicode text", 0, 300, 300, 200, style); Page pg = new Page(); _pdfDocument.Pages.Add(pg); _pdfDocument.Pages[0].Elements.Add(txtArea); _pdfDocument.Draw(@"C:\TestMe.pdf"); My PDF shows squares instead of unicode once the PDF gets generated. Can you please let me know what can be done with this?

Re: Unicode Support

Support · Apr 23, 2009
Hello, You can use the Unicode values without any problem. You will have to use a font which supports the Unicode text you are adding to the PDF. You can use any True Type, Type1 etc fonts for this. You can refer to the Fonts section on our help documentation. Thanks, ceTe Software Support Team.

Re: Unicode Support

Forum member · Apr 24, 2009
Thanks for your reply. However as you can see in the code block i gave above, I am already using the TrueType font and still have this issue. Just to rephrase the issue, after PDF gets created, the resultant PDF shows all unicode characters are SQUARES. Can you please let me know if there is anything beyond this needs to be done?

Re: Unicode Support

Support · Apr 24, 2009
Hello, You are getting the square boxes instead of text is probably because the font you are using does not support the characters you are trying to add. You will have to use a true type font which supports the text you are adding. If you are sure that the font you are using supports the text then please send over the font file and the code you are using including the Unicode values to our [^a|mailto:support@cete.com|Support Team^] so that we can look into it further. Thanks, ceTe Software Support Team.