该代码正在使用Internet Explorer并提供所需的结果,但未与Google Chrome一起使用
string attachment = "attachment; filename=" + TitlePdf;
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/pdf";
HTMLWorker htmlworker = new HTMLWorker(document);
htmlworker.Parse(new StringReader(done));
document.Close();
Response.Write(document);
Response.End();