We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Display euro sign (€) in PDF document

Thread ID:

Created:

Updated:

Platform:

Replies:

101321 Oct 14,2011 11:38 AM UTC Feb 8,2017 05:35 AM UTC Silverlight 9
loading
Tags: PDF
Jorik Schaillée
Asked On October 14, 2011 11:38 AM UTC

Hi,

I'm trying to display a euro symbol within a PDF document.
However the symbol is displayed as ¬ instead of €.
The $ and ¥ are displayed properly.

Below you can find a small code snippet:

-----------------------------------------------
PdfDocument document = new PdfDocument();
document.PageSettings.Orientation = orientation;
document.Pages.Add();

PdfFont fontTitle = new PdfStandardFont(PdfFontFamily.Helvetica, 8);
PdfStringFormat totalFormat = new PdfStringFormat();
totalFormat.Alignment = PdfTextAlignment.Left;
totalFormat.MeasureTrailingSpaces = false;

RectangleF rectTotals = new RectangleF(0, 30, document.Pages[0].GetClientSize().Width, 20);
g.DrawString("€ $ ¥", fontTitle, PdfBrushes.Black, rectTotals, totalFormat);
-----------------------------------------------

How can i fix this?

Thanks in advance,
Jorik


Geetha M [Syncfusion]
Replied On October 17, 2011 10:07 AM UTC

Hi Jorik,

Thank you for the details.

I was able to reproduce the problem. I have forwarded it to our development team for more analysis. Could you please create a new direct trac incident so that I can post you further details on this?

Regards,
Geetha


Jorik Schaillée
Replied On October 17, 2011 12:06 PM UTC

Thanks for the reply Geetha.
I created a new direct trac incident with id 86191.

Regards,
Jorik


Geetha M [Syncfusion]
Replied On October 21, 2011 06:17 AM UTC

Hi Jorik,

Thank you for the update.

Regards,
Geetha


Frederik Gysel
Replied On February 5, 2017 06:55 PM UTC

Hi,

Has this issue been solved?


Thank you
Frederik

Chinnu Muniyappan [Syncfusion]
Replied On February 6, 2017 12:23 PM UTC

Hi Frederik, 
 
Thank you for your update. 
 
Yes, we can draw the Unicode text by using PdfTrueTypeFont, please refer the below code snippet for more details. 
 
           //Create a new PDF document 
            PdfDocument doc = new PdfDocument(); 
 
            //Add a new PDF page 
            PdfPage page = doc.Pages.Add(); 
 
            //Create a new PDF true type font. 
            PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Arial", 12, FontStyle.Regular), true); 
 
            //Draw the Unicode text 
            page.Graphics.DrawString("€ $ ¥", font, PdfBrushes.Black, new PointF(10, 10)); 
 
            //Save the PDF document 
            doc.Save("output.pdf"); 
 
            //Close the PDF document 
            doc.Close(true); 
 
Please let us know if you have any concern. 
Regards, 
Chinnu 


Frederik Gysel
Replied On February 6, 2017 03:46 PM UTC

Thank you for your feedback Chinnu.

What in case of HTML code (containing € or à) to PDF conversion?

Thank you
Frederik

Prakash Viswanathan [Syncfusion]
Replied On February 7, 2017 10:49 AM UTC

Hi Frederik, 
 
If the HTML code contains € or à, then our WebKit HTML converter preserves how it is displayed on web browsers. On our further analysis, we can display euro symbol (€) in HTML using different ways (€ or € or €). If you directly use € symbol in HTML you have to define the charset as UTF-8 in meta tag. I have attached input HTML and output PDF documents for your reference.  
 
 
Note: Currently we do not have support for HTML to PDF using WebKit HTML converter in silver light  
 
You can get latest WebKit installer from below link, 
Latest WebKit HTML Converter: https://www.syncfusion.com/downloads/latest-version    
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Prakash V. 


Frederik Gysel
Replied On February 7, 2017 06:58 PM UTC

Hi Prakash,

This is very clear.

Thank you for your elaborated reply.

Regards
Frederik

Prakash Viswanathan [Syncfusion]
Replied On February 8, 2017 05:35 AM UTC

Hi Frederik, 
 
Thanks for your update. 
Please let us know if you need further assistance on this. 
 
Regards, 
Prakash V. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;