We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Getting An Error When Running HtmlConverter from Azure

Hi,

I have an implementation using HTmlConverter from the Syncfusion.HtmlToPdfConverter.AspNet.Mvc5 package @ version 20.4.0.52.

This works fine when run locally but when I publish to Azure and run from there via a PowerAutomate flow, I get an error:- "Blink files are missing at C:\home\site\wwwroot\Libraries\BlinkBinaries"

I have moved the Binaries folder to our Libraries folder.

Can you provide any guidance?

Thanks,

Simon





3 Replies

GK Gowthamraj Kumar Syncfusion Team March 9, 2023 09:07 AM UTC

The Blink rendering engine does not support conversion in Azure app service (Azure websites) and Azure function. The Azure app service environment does not have elevated permissions and enough rights to launch the browser for converting HTML to PDF. However, we can use the Html to PDF converter with the .NET Core library in Azure App Service Linux or Azure Functions Linux.


Please refer to the below link for more information, 

https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/azure

https://www.syncfusion.com/kb/12909/how-to-convert-html-to-pdf-in-azure-app-service-linux-with-blink-rendering-engine   


The mentioned NuGet Syncfusion.HtmlToPdfConverter.AspNet.Mvc5 package is suitable for ASP Net Framework only. If you are using the .NET Core platform, you need to install the below-recommended package.
 


https://help.syncfusion.com/file-formats/pdf/converting-html-to-pdf#nuget-packages-required-recommended


Please try the above solution on your end and let us know the result.



SH Simon Hewitt March 9, 2023 02:20 PM UTC

Hi Gowthamraj,


I've upgraded to Syncfusion.HtmlToPdfConverter.Net.Windows as suggested.

The conversion is returning a different error: "Failed to convert webpage".


The webpage can be successfully converted when running locally - the error occurs when calling our Api from PowerAutomate.


I'd be grateful for any advice.



SN Santhiya Narayanan Syncfusion Team March 13, 2023 06:29 AM UTC

As we said earlier, the Blink rendering engine does not support conversion in Azure app services (Azure websites) or Azure functions in Windows. If you are using a Linux app service, you can use the converter with the.NET Core API in Azure App Service Linux.

 

So you need to install the Syncfusion.HtmlToPdfConverter.Net.Linux NuGet package

 

Please refer below documentation page

https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/azure#azure-app-function-linux



Loader.
Live Chat Icon For mobile
Up arrow icon