Error occured while converting to pdf. Failed to launch chromium Due to insufficient permission unable to launch chromium process for conver

Hi, I am trying to use  convert Html to Pdf with  blink converter using  Syncfusion.HtmlToPdfConverter.Net.Windows nuget package and after publishing the service in to Azure App Services below error occurred and  it does not convert the html to pdf --> "Error occurred while converting to pdf. Exception:Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion".

is there Any solution for this issue?

I tried to place QtBinariesWindows as well like this and that also not solved the issue

Image_9820_1714721900461


Image_6108_1714721711063


4 Replies

HS Harsha Subasinghe May 5, 2024 09:06 AM UTC

Is there any solution or workaround for this?



KS Karmegam Seerangan Syncfusion Team May 6, 2024 09:09 AM UTC

Hi Harsha,

Thank you for reaching out to Syncfusion support.

The Blink rendering engine does not support conversion in the Azure app service or Azure functions in Windows due to the GDI limitations and restrictions of the Azure App service environment. So, we could not convert HTML to PDF using Blink in Azure App Service windows. So, you can use the Blink rendering engine with .NET Core library in Azure App Service Linux or Linux Docker image or  Azure Functions Linux.

Please find the below UG and KB links for more details,

Convert HTML to PDF in Azure | Syncfusion
Convert HTML to PDF in Azure App service with Docker | Syncfusion
Convert HTML to PDF in Azure Functions Linux| Syncfusion
How to convert HTML to PDF in Azure App Service Linux with Blink rendering engine? | Syncfusion

If you still want to perform the conversion in the Windows Azure app service, you can use the Webkit rendering engine instead of Blink. Please refer to the documentation below for converting HTML to PDF using the WebKit rendering engine.

 

NuGet: NuGet Gallery | Syncfusion.HtmlToPdfConverter.QtWebKit.Net.Core 25.1.42

Documentation: Convert HTML to PDF in Azure App Service on Windows | Syncfusion

Kindly follow the above documentation to publish the HTML to PDF document conversion in Azure App Service for Windows. If you are facing any issues, we kindly request you to share the complete code snippet, input HTML/URL, package version, package name, and Azure hosting plan to check the reported issue on our end. This information will be more helpful for us to analyze and provide you with a prompt solution.

Regards,

Karmegam



HS Harsha Subasinghe replied to Karmegam Seerangan May 13, 2024 03:45 AM UTC

Thank you very much for the details Karmegam, I tried the steps but then I got error 

Error occured locally while converting to pdf. Eception:Blink files are missing at C:\Repos\AddoCreateDocument\CreateDocumentService\CreateDocument.Api\bin\Debuget7.0\runtimes\win-x64ative

But I have these files in that location 

Image_6825_1715571039016

And I trued to set the "BlinkPath" for the Linux native folder , which have below files, and that gave the same error with the blinkpath changes

Image_8789_1715571322860

Any idea about this error. 



KS Karmegam Seerangan Syncfusion Team May 14, 2024 01:07 PM UTC

We have checked the reported issue with provided details on our end. We suspect the reported issue occurs while converting the HTML to PDF document with missing or mismatched Blink files in the runtime folders.

 

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux. So, separate packages are provided based on OS. Include the packages based on your requirement.

 

Please refer the below documentation,

NuGet Packages Required (Recommended)

 

You can install the both the Windows and Linux packages in same project. If you are running the project in the windows machine, it will automatically referred the windows source and windows blink binaries. If you are running the project in Linux or Azure Linux Services (App service or Function), it will automatically takes the Linux source and Linux blink binaries. Kindly install the NuGet packages based on the OS platform. 

Please refer the below screenshots for OS based blink files.

Windows:

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

 

image

 

Linux:

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

 

image

 

Kindly make sure your blink binaries based on the OS platform and try the conversion. If you are still facing issue, we kindly request you to share the simplified sample, complete code snippet, and environment details (such as OS platform, bit version, and RAM size) to check this on our end. This information will be more helpful for us to analyze and assist you further on this.



Loader.
Up arrow icon