question

JJ-3439 avatar image
0 Votes"
JJ-3439 asked bhargaviannadevara-msft answered

SelectPdf error on Azure App Service

I have a .NET core 3.1 web app running on Azure App Service that is using SelectPdf to convert some HTML document to PDF. It was working perfectly on my localhost but once I publish on to Azure, I got the following error no matter how small/simple my HTML document is:

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)

My current app service is on the basic Dev/Test plan (does this even matter)?

azure-webapps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

bhargaviannadevara-msft avatar image
0 Votes"
bhargaviannadevara-msft answered

@JJ-3439 Thanks for reaching out. As mentioned in SelectPdf docs:

SelectPdf Html To Pdf Converter (v18.3) or above works on Azure Web Apps, on Windows, and an App Service Plan starting with Basic (does not work with Free/Shared plans). Using a Standard or Premium plan will make conversions faster.

The Web Apps version uses a restricted rendering engine and because of that, some features are not available. To name a few: no support for web fonts, support only for single page PdfHtmlElement objects, no support to exclude elements from conversion.

Please check if the following helps:

If the error persists, request you to open an issue with SelectPdf on GitHub here: https://github.com/selectpdf/selectpdf-free-html-to-pdf-converter/issues/



If an answer is helpful, please "Accept answer" and/or "Up-Vote" which might help other community members reading this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.