private void HtmlToPDF(string HtmlPath,string PdfPath)
{
Document document = new Document(PageSize.A4, 80, 50, 30, 65);
try
{
PdfWriter.GetInstance(document, new FileStream(PdfPath, FileMode.Create));
HtmlParser.Parse(document, HtmlPath);
document.Close();
}
catch(Exception e)
{
document=null;
throw e;
}
}
现在已经实现了 但是不能转换中文