【发布时间】:2014-02-19 06:19:56
【问题描述】:
当我尝试从 HTML 生成 PDF 时,PDF 中缺少一些土耳其语字符,例如 ĞÜŞİÖÇ ğüşıöç,我看到一个空格代替了这些字符,但我想打印该字符。
我的代码是:
public virtual void print pdf(string html, int id)
{
String htmlText = html.ToString();
Document document = new Document();
string filePath = HostingEnvironment.MapPath("~/Content/Pdf/");
PdfWriter.GetInstance(document, new FileStream(filePath + "\\pdf-"+id+".pdf", FileMode.Create));
document.Open();
iTextSharp.text.html.simpleparser.HTMLWorker hw =
new iTextSharp.text.html.simpleparser.HTMLWorker(document);
hw.Parse(new StringReader(htmlText));
document.Close();
}
如何在 PDF 上打印所有土耳其语字符?
【问题讨论】:
标签: itextsharp