Issue trying to use INR currency symbol in PDF

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v11)  /  Issue trying to use INR currency symbol in PDF

DynamicPDF CoreSuite for .NET (v11) Forum

My document uses Helvetica font, and I can get the dollar, pound and euro to work but cannot seem to get the rupee symbol to display in the PDF no matter what I tried with the Unicode character or any OpenType font. Seems to display nothing, a square box or the Unicode text depending on what I try.  Basically, I have a text area displaying a total preceded by the currency symbol as in "Total: $123.50".
Can anyone point me to a working example?
Posted by a ceTe Software moderator
Hi,

Unfortunately the Helvetica font does not have the Rupee currency symbol in it. You will need to use an OpenType font that contains that character in order for it to display.

Thanks,
ceTe Software Support Team
Would you happen to know which font does as I have tried several and none have worked?
Posted by a ceTe Software moderator
Hi,

You can try using the Unicode value for the Rupee symbol and see if it helps on your end.

Here is a code sample:

            Document document = new Document();
            Page page = new Page();
            document.Pages.Add(page);
            string fontPath = @"arialbd.ttf";
            OpenTypeFont font = new OpenTypeFont(fontPath);
            //Unicode value to add Rupee character
            TextArea area = new TextArea("Total: \u20B9 123.50", 0, 100, 200, 12, font, 12);
            page.Elements.Add(area);
            document.Draw(@"C:\Temp\fontOutput.pdf");
          

Thanks,
ceTe Software Support Team
Thank you. The arialbd.ttf font did the trick. The others I tried just gave me a square box or other character.

All times are US Eastern Standard time. The time now is 6:17 AM.