簡體   English   中英

SelectPdf -.NET Core 3.1 - 無法在 Azure 應用服務上將 HTML 轉換為 PDF

[英]SelectPdf - NET Core 3.1 - Failed to convert HTML to PDF on Azure App Service

我有一個 .NET Core 3.1 web 應用程序運行在 Azure 應用程序服務上,它使用 SelectPdf 將一些 HTML 文檔轉換為 PDF。它在我的本地主機上運行完美,但是一旦我發布到 8835877606448簡單的我的 HTML 文檔是:

System.Exception: Could not get conversion result header. Data transfer error. Data transmission error 109
   at SelectPdf.HtmlToImage.ᜀ(String A_0, String A_1, String A_2, ជ& A_3, String& A_4)
   at SelectPdf.HtmlToPdf.ᜁ(String A_0, String A_1, String A_2, String A_3, Boolean A_4)
   at SelectPdf.HtmlToPdf.ConvertHtmlString(String htmlString)

我當前的應用程序服務是基於基本的開發/測試計划(這有關系嗎)?

披露:我為 SelectPdf 工作。

恐怕你在 Azure 上使用什么計划很重要。Azure 有很多限制,SelectPdf 在 Azure 上使用備用渲染引擎。要在你的計算機上測試它,你需要設置:

GlobalProperties.EnableRestrictedRenderingEngine = true;

SelectPdf 需要從 Basic 開始的 Azure 應用服務計划(不適用於免費/共享計划)。

有關部署到 Azure 的更多詳細信息,請參見此處: https://selectpdf.com/docs/SelectPdf-Microsoft-Azure.htm

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM