Webforms 页面代码背后
XSettings.InstallRedistributionLicense("REDACTED");
var theDoc = new Doc();
theDoc.HtmlOptions.Engine = EngineType.Gecko;
theDoc.Rect.Inset(72, 144);
theDoc.Page = theDoc.AddPage();
int theID = theDoc.AddImageUrl("http://www.woot.com/");
while (true)
{
theDoc.FrameRect(); // add a black border
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();
}
Response.Buffer = false;
Response.AddHeader("Content-Disposition", "inline; filename=\"rept.pdf\"");
Response.ContentType = "application/pdf";
theDoc.Save(Response.OutputStream);
Response.Flush();
应该工作得很好..但是得到
Failed to add HTML: RPC to Gecko engine process failed.Remote process terminated unexpectedly.
在 bin 文件夹中运行完全信任
- XULRunner 文件夹和 C:\Program Files (x86)\WebSupergoo\ABCpdf .NET 9.0\ABCGecko 中的所有内容
- ABCGecko.dll
- ABCpdf.dll
- ABCpdf9-32.dll
打包/发布 Web 此项目文件夹中的所有文件