Document doc = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35);
BaseFont marathi = iTextSharp.text.pdf.BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.EMBEDDED);
iTextSharp.text.Font fontNormal = new iTextSharp.text.Font(marathi, 12, iTextSharp.text.Font.NORMAL);
PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream("c:\\Test11.pdf", FileMode.Create));
//Open Document to write
doc.Open();
//Write some content
Paragraph paragraph = new Paragraph("English मराठी English मराठी English मराठी ");
// Now add the above created text using different class object to our pdf document
doc.Add(paragraph);
doc.Close(); //Close document
我正在使用上面的代码来生成PDF文件。生成的PDF文件只包含英语单词,不包含मराठी。如何在使用Asp.net/C#和itextsharp生成的pdf文件中嵌入unicode marathi文本?
需要做些什么才能让unicode Marathi字符串包含在pdf中?
如何在上面的段落添加HTML标签 – chandrakat 2011-02-25 07:10:26