I wrote a PDF and I'm trying to write in Hebrew (UTF-8), and I cannot use C # and Visual Studio 2010 in Windows Forms using the following code.
Document Doc = new Document(PageSize.LETTER);
using (FileStream fs = new FileStream("C:\\Users\\moshe\\Desktop\\Test18.pdf", FileMode.Create, FileAccess.Write, FileShare.Read))
{
PdfWriter writer = PdfWriter.GetInstance(Doc, fs);
Doc.Open();
Doc.NewPage();
string ARIALUNI_TFF = Path.Combine("C:\\Users\\moshe\\Desktop\\proj\\gold\\fop\\gold", "ARIAL.TTF");
BaseFont bf = BaseFont.CreateFont(ARIALUNI_TFF, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
iTextSharp.text.Font f = new iTextSharp.text.Font(bf, 12);
Doc.Add(new Phrase("מה קורה", f));
Doc.Add(new Phrase("תודה לכולם", f));
Doc.Close();
I put the font in a folder.
What do I need to do?
source
share