Hi. I am attempting to get unicode characters to display. For example Chinese and Korean. I only get squares. I am trying to use the font "arialuni.ttf" and get it embedded it in the pdf. Its in my fonts folder. I've read the posts about unicode characters and it seems like it should work if I can get the font embedded. Right now, its not shown in the pdf properties. I don't think its finding arialuni.ttf in my fonts folder.
Code:
Document document = new Document();
document.Info.Title = "Created with MigraDoc";
Section section = document.AddSection();
section.PageSetup.PageFormat = PageFormat.Letter; //A4;
// unicode text
// must use a unicode font like arialuni.ttf
Paragraph paragraph = section.AddParagraph();
paragraph.Format.Font = new MigraDoc.DocumentObjectModel.Font("Arial Unicode MS Regular", Unit.FromPoint(12));
paragraph.AddText("This is Chinese: " + "来自美国的你好");
paragraph.AddText("This is Korean: " + "미국에서 온 안녕하세요");
// render to a pdf
PdfDocumentRenderer pdfRenderer = new PdfDocumentRenderer(true);
// pass the document to the renderer:
pdfRenderer.Document = document;
pdfRenderer.RenderDocument();
string filename = BASE_PATH + "HelloWord.pdf";
pdfRenderer.PdfDocument.Save(filename);