我目前正在使用 abcPDF 7 将 HTML 转换为 PDF。这是通过我覆盖 Render 方法的 ASPX 页面完成的。
Doc theDoc = new Doc();
theDoc.SetInfo(0, "License", m_License );
theDoc.HtmlOptions.Paged = true;
theDoc.HtmlOptions.Timeout = 1000000;
string callUrl = "http:// my app page";
theDoc.AddImageUrl(callUrl);
Response.Clear();
Response.Cache.SetCacheability(HttpCacheability.Private);
Response.AddHeader("Content-Disposition", "attachment; filename=" + sFile + ".pdf");
Response.ContentType = "application/octet-stream";
theDoc.Save(Response.OutputStream);
Response.Flush();
这对于第一页非常有效,但随后会截断页面并且不会继续呈现剩余页面。
有谁知道为什么它在页面后停止?