Display euro symbol in PDF Document

Hello,
Into a UWP app, I use syncfusion's PDF system to write a PDF. I am unable to correctly write the EURO symbol... If I use the standard way (ToString("C")) it works with $ but not with euro. In order to write the euro symbol I can use a trick : 
ToString("0.00 ")+"\u0080"
But I does not like this trick, because I loose the possibility to use the system currency ($ in US, euro in France)...

Do you have a solution to correctly display this symbol ? 
Thanks !

1 Reply

SL Sowmiya Loganathan Syncfusion Team January 31, 2018 10:32 AM UTC

Hi Alexandre, 

Thank you for contacting Syncfusion support. 

We can draw the Unicode text (like €, $, ¥ ) by using PdfTrueTypeFont in UWP platform.  

Please find the below code snippet :  

            //Load the true type font.  
            Stream fontstream =typeof(MainPage).GetTypeInfo().Assembly.GetManifestResourceStream("App1.Assets.arial.ttf");  
  
            //Create a new PDF document.  
            PdfDocument doc = new PdfDocument();  
  
            //Add a new page.  
            PdfPage page = doc.Pages.Add();  
  
            //Initialize the PDF true type font.  
            PdfFont font = new PdfTrueTypeFont(fontstream, 12, PdfFontStyle.Regular);  
  
            //Draw text.  
            page.Graphics.DrawString("hello world! @ # €", font, PdfBrushes.Black, new System.Drawing.PointF(0, 0));  


Please find the below Forum link for more details : 

Please let us know if you need further assistance on this. 

Regards, 
Sowmiya L 


Loader.
Up arrow icon