spo*_*rts 8 pdf-generation abcpdf azure wkhtmltopdf rotativa
鉴于环境问题(将其视为事实):
1)Rotativa PDF(https://github.com/webgio/Rotativa)使用exe来创建PDF,因此它不适用于azure网站(没有执行该exe的权限)
2)ABCPdf也有同样的问题
3)EO.Pdf有类似的问题("使用Windows GDI但Windows Azure WebSite不支持Windows GDI",http://www.essentialobjects.com/doc/4/install/deploy.aspx)
4)我不想拥有Azure Cloudapp(允许我使用Rotativa或ABCPdf).我的Azure网站很好(除了以前的问题).
有替代解决方案吗?
是否还有其他用于从HTML创建可以在Azure网站(不是CloudService或VM)上运行的PDF的库?
更新nov-2014:
我今天使用的是MvcRazorToPdf,非常棒.
控制器代码:
return new PdfActionResult(palletReception, (writer, document) =>
{
document.SetPageSize(new Rectangle(792f, 612f));
document.NewPage();
})
{
FileDownloadName = "foo.pdf"
};
Run Code Online (Sandbox Code Playgroud)
查看代码:
Run Code Online (Sandbox Code Playgroud)A normal view with normal css. Must be accepted by iText XMLWorker Check this: http://demo.itextsupport.com/xmlworker/itextdoc/flatsite.html and this: http://demo.itextsupport.com/xmlworker/
您可以利用 iTextSharp ( http://sourceforge.net/projects/itextsharp/ )。过去使用它非常成功。如今它甚至可以作为 nuget 包使用 - https://www.nuget.org/packages/itextsharp/。
| 归档时间: |
|
| 查看次数: |
3250 次 |
| 最近记录: |