I'm trying to display the sigma char into a PDF generated by code in my C#
(Framework 4
) application. I'm using iTextSharp
(V. 4.1.2.0).
Whenever I try and print my char using the following snippet...
string l_sTmpText = "\u03A3";
l_table.AddCell(new Phrase(l_sTmpText, MyFont));
...I get nothing but a blank space in my PDF. When going in debug, My sigma char is properly display within Visual Studio so I suspect this is an encoding problem.
I've found and read this post : iTextSharp international text...
...But I still cannot manage to make it work. I tried to create a BaseFont
like this :
private static BaseFont MySpecialBaseFont = iTextSharp.text.pdf.BaseFont.CreateFont("C:\Windows\Fonts\Arial.ttf", iTextSharp.text.pdf.BaseFont.IDENTITY_H, iTextSharp.text.pdf.BaseFont.EMBEDDED);
My problem is the construction of a Phrase
object requires a Font
and not a BaseFont
. I'm stuck around here...