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?
Issue trying to use INR currency symbol in PDF
Re: Issue trying to use INR currency symbol in PDF
Support · Jan 27, 2023Hi,
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
Re: Issue trying to use INR currency symbol in PDF
Forum member · Jan 27, 2023Would you happen to know which font does as I have tried several and none have worked?
Re: Issue trying to use INR currency symbol in PDF
Support · Jan 30, 2023Hi,
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
Re: Issue trying to use INR currency symbol in PDF
Forum member · Jan 30, 2023Thank you. The arialbd.ttf font did the trick. The others I tried just gave me a square box or other character.