html to pdf running on azure windows vm not working

Hi,

I am using HtmlToPdfConverter class with "QtBinariesWindows" to convert html to pdf developed with dot net core 3.1 LTE. 

I have deployed my application to Azure VM  Standard D2s v3 (2 vcpus, 8 GiB memory) windows machine. 

At time of conversion I am getting below error: 

Error Detail: Syncfusion.Pdf.PdfException: Html conversion failed

Please do the needful. 


Thanks,

Rakshit Shah


1 Reply

GK Gowthamraj Kumar Syncfusion Team September 20, 2021 09:39 AM UTC

Hi Rakshit, 
 
Thank you for using Syncfusion products.  
  
We have checked the reported issue with provided details, the reported issue may occurs in following cases,  
 
Cause  
Solution  
Using Free/shared hosting plan  
While hosting the application in Azure, the converter may throw an exception under Consumption/Free/Shared hosting plans on Azure. Due to the access restrictions and limitation of these hosting plans, it prevents the loading of the browser process. So, the conversion will be failed in the Consumption/Free/Shared hosting plans on the Azure environment. Other hosting plans do not have the restriction for loading the browser process. Please try the conversion with Basic (B1) or above hosting plans and let us know the result.    
QtBinaries file not shipped properly 
Please make sure the all the files from QtBinaries folder are shipped to Azure app service environment using console in Azure portal. If some are missing, kindly include them manually and try the conversion. 
Deploy option 
If you are using Run from package option, the reported issue may occur. So, can you please try the conversion without run from package option while deploying the app to azure app service.     
Using zip deploy options  
WebKit rendering engine will not work in zip deploy options, so kindly try the conversion without zip deploy option.   
  
Note: Kindly make sure you are using the hosting plan from Basic (B1) or above mentioned hosting plans to publish on the Azure environment. Also please check with a simple conversion like (https://www.google.com ) on your end and let us know the result.     
 
Please refer below link for more information about HTML to PDF conversion in Azure App service using .NET core.  
 
Kindly refer the below links for prerequisites of WebKit HTML converter,   
 
If still the same exception occurs, kindly please provide us more details about your Azure subscription details (app service, cloud service or function), target OS, sample, published profile details (Region, Size, hosting plans, etc.,) to check the issue in our end. So, that it will be helpful for us to analyze and provide you the solution at the earliest.    
 
Regards, 
Gowthamraj K 


Loader.
Up arrow icon