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
close icon

WebKitHtmlConverter not working on deployed Azure website

We have a ASP.Net MVC application running on Azure website. We are trying to convert an url to pdf.

It works ok when we run the application locally, being able to generate and open the pdf file with the url content. When we deploy to Azure website, it just keeps waiting and do nothing, not even showing a blank pdf.

Any idea why is this happening? could it be related to files msvcp100.dll, msvcr100.dll not being available at Azure website? in that case the expected error is a blank pdf, which doesn't seems to happen here.

Thanks in advance,
Danfer.

2 Replies

KK Karthik Krishnaraj Syncfusion Team September 21, 2015 10:49 AM UTC

Hi Danfer,
Thank you for contacting Syncfusion support,
Inorder to convert HTML to PDF using WebKit rendering engine, it requires elevated permission to convert Webpages to PDF document. Azure website do not have the elevated permission, as a result conversion of URL to PDF fails. As a workaround we suggest you to create a WebRole for the conversion part alone and host in Azure cloud, and then the WebRole can be add as service reference in your main sample. I have attached a simple sample for WebRole part, and also please refer the below steps to deploy the WebRole in Azure.

1) Create a new “WCF Service Application” project.

2) Add the code to convert HTML to PDF, I have attached the sample below for your reference.

3) After testing the Service in local machine host in Azure, make sure you have enabled “Copy Local” to True.

4) Project -> Convert to Windows Azure Cloud Service Project.

5) Then “Publish to Azure Cloud” from Solution Explorer
6) Once published add this as service reference to the Sample.

Sample Link:

WebRole for converting HTML to PDF

http://www.syncfusion.com/downloads/support/directtrac/138284/WebRoleWebkit_WCFService-1518735019.zip

WebRole for converting HTML to PDF with Azure Project

http://www.syncfusion.com/downloads/support/directtrac/138284/WebRoleWebkit_withQTAssemblies-1652665198.zip

Console Sample for using WebRole

http://www.syncfusion.com/downloads/support/directtrac/138284/WebkitConsoleWCF1621269699.zip


Please let us know if you need any further assistance.

Thanks,

 Karthik.


SA Sandro March 23, 2018 01:51 PM UTC

.

Loader.
Live Chat Icon For mobile
Up arrow icon