itext - iText(任何版本)是否适用于 Windows Azure 网站?

标签 itext azure-web-app-service itext7

Azure 应用服务(以前称为网站)有很多限制,所以我想知道 iText 的 PDF 创建工具是否仍然有效。具体来说,我会将 HTML 转换为 PDF,包括各种样式和图像。

由于其局限性,rotativa 和 Pechkin 均不适用于 Azure 应用服务。

最佳答案

There are many limitations with the Azure App Service (formerly websites), so I was wondering if iText's PDF creation tools still worked.



根据我对以下示例的测试,我可以使用 iText 7生成PDF文件,它在Azure App Service Web App上运行良好。
var path = Server.MapPath("test.pdf");

FileInfo dest = new FileInfo(path);

var writer = new PdfWriter(dest);
var pdf = new PdfDocument(writer);
var document = new Document(pdf);
document.Add(new Paragraph("hello world"));
document.Close();

生成的 PDF:

enter image description here

此外,我正在使用 iText 的基本功能,它在 Azure Web App sandbox 上运行良好.如果 iText 的任何高级功能无法在沙箱上运行,您可以尝试其他托管选项(例如云服务、虚拟机)。

关于itext - iText(任何版本)是否适用于 Windows Azure 网站?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45471073/

相关文章:

Azure 请求显示在 New Relic -/Jobs/InvokeTriggeredJobs 中

html - itextsharp "razor to html"工作正常但 "to pdf"忽略样式

带有 Unicode 字符的 PDF 表单

java - iTextPDF:动态更改表格对齐方式

authentication - Azure移动应用程序刷新服务器上的 token

c# - 如何从 PDF 中读取日语字符?

java - 使用 iText 删除 PDF 中的重复字体

python - 将 python 脚本部署和运行到 azure 资源是如何工作的?

java - iText7,无法设置 formField 值而不出现错误

java - iText 7 : Paragraph height as it would be rendered