1
내가 HTML을 PDF로 내보낼
을 생성, 문서가 생성됩니다 만 첫 페이지HtmlOption.Engine은 첫 페이지
Doc theDoc = new Doc();
theDoc.HtmlOptions.UseScript = true;
theDoc.HtmlOptions.Media = MediaType.Print;
theDoc.HtmlOptions.InitialWidth = 1048;
theDoc.HtmlOptions.ImageQuality = 101;
theDoc.HtmlOptions.UseScript = true;
theDoc.HtmlOptions.OnLoadScript = "(function(){ window.ABCpdf_go = false; setTimeout(function(){ window.ABCpdf_go = true; }, 55000); })();";
theDoc.HtmlOptions.Engine = EngineType.Gecko;
theDoc.HtmlOptions.PageLoadMethod = PageLoadMethodType.WebBrowserNavigate;
theDoc.HtmlOptions.ForMSHtml.UseScript = true;
int theID = theDoc.AddImageHtml(htmlContent);
while (true)
{
theDoc.FrameRect();
if (!theDoc.Chainable(theID))
break;
theDoc.Page = theDoc.AddPage();
theID = theDoc.AddImageToChain(theID);
}
for (int i = 1; i <= theDoc.PageCount; i++)
{
theDoc.PageNumber = i;
theDoc.Flatten();
}
theDoc.Save(HttpContext.Current.Server.MapPath("htmlimport.pdf"));
theDoc.Clear();
게코 모든 페이지를 어떻게 할 수있는 추가? 나는 Gekoengine을 사용하려면
작동하도록 설정 했습니까? 나는 같은 문제가 있는데, 아래에 허용 된 대답은 아무것도 추가하지 않는 것 같습니다. 감사 – user1259167