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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Failed to convert the webpage exception with WebKit HTML converter

Platform: WinForms |
Control: PDF |
Published Date: November 30, 2017 |
Last Revised Date: December 13, 2018

The following are some cases, where WebKit HTML converter may throw Failed to convert webpage exception and the solution to overcome this.

Reason

Solution

If the Syncfusion.HtmlConverter.Base.dll assembly is blocked in the machine, then the converter may throw this exception.

Unblock the assembly if it is blocked by referring to the following screenshot of Syncfusion.HtmlConverter.Base.dll,

 

 

This exception may occur if the assemblies and QtBinaries are used from different version of WebKit installers.

Make sure to use the Syncfusion assemblies and QtBinaries from the same WebKit Installer since there will be some changes in the assemblies and QtBinaries for every release.The assemblies and QtBinaries for a specific version can be get by installing the WebKit HTML converter.

WebKit HTML converter: https://www.syncfusion.com/downloads/version-history    

 

While converting HTML to PDF, WebKit HTML converter internally creates temporary files in temp folder for conversion.

 

If the temporary folder does not have elevated permission for the respective user then the WebKit HTML converter may throw this exception.

By default, WebKit HTML converter gets system temporary folder to create temporary files for conversion. Please refer to the following examples of default temporary folder.

 

  • C:\Users\<<username>>\AppData\Local\Temp
  • C:\Windows\Temp

 

Make sure that the previous paths have elevated permission for respective user.

 

(Or)

 

The WebKit HTML converter has support for setting temporary path. Using the TempPath property, you can set any folder path that has read/write/execute permission. Then, the converter uses this path for creating temporary files. Refer below code snippet to set temp folder.  

 

 

If the user has elevated permission, but still getting the failed to convert webpage exception.

 

Please try hosting an application in different user account of the server and check the conversion.

WebKit HTML converter may throw this exception if the Web Application is published in a network shared location.

 

To avoid this exception, publish the application in the server’s local disk, where it will be hosted. Please do not publish the website to shared network location.

If the temporary executables are blocked due to group policy/third party softwares in server.

The temporary executables can be whitelisted in the server using the following ways:

 

  • Set the path of a folder in server as the temporary executables path by setting the TempPath property of WebkitConverterSettings and add that folder’s path in the exception list of group policy/Third Party Software.

 

 

 

 

  • Set a name for the executable in the server by setting the TempFileName property of WebkitConverterSetings and add that name in the exception list of group policy/Third Party Software.

 

 

 

The temporary path may do not have the required (read/write/execute) permission.

 

Enable the read/write/execute permission of the temporary path for the respective group.   

If the failed to convert webpage exception occurs only for particular URL.

 

Please contact Syncfusion support with input HTML, code snippet, and environment details (OS, culture settings, bit version etc.,).

 

ADD COMMENT
You must log in to leave a comment
Comments
rayman
Jan 26, 2019

how to go about solving this issue if application is hosted on azure ?

Reply
KarthikeyanC [Syncfusion]
Jan 28, 2019

Hi Rayman,

 

Cause

Solution

Failed to convert web page exception

 

 

Before deploying the application, ensure the conversion in local machine. Please refer below KB for more information about HTML to PDF conversion in Azure.

 

KB: https://www.syncfusion.com/kb/7543/  

Failed to convert web page exception in Azure.

 

Please make sure you are using the hosting plans from B1 or above. As our HTML to PDF conversion will works from basic hosting plan (B1). So, select the hosting plan based on the need. HTML to PDF conversion will not work if the hosting plan is Free/Shared.

Unblock the assembly if it is Syncfusion.HtmlConverter.Base.dll,

 

When deploying the application to Azure, the assemblies will not getting blocked. So, please ensure the assembly is unblocked in your local machine before deploying to Azure app service.

This exception may occur if the assemblies and QtBinaries are used from different version of WebKit installers.

You can ensure the Assemblies and QtBinaries are used from the same version of HTML converter in your local machine, before deploying into Azure.

While converting HTML to PDF, WebKit HTML converter internally creates temporary files in temp folder for conversion.

 

  1. If the temporary folder does not have elevated permission for the respective user then the WebKit HTML converter may throw this exception.

 

  1. If the temporary executables are blocked due to group policy/third party softwares in server.

 

  1. The temporary path may do not have the required (read/write/execute) permission.

Please set the bin folder or QtBinaries folder path as temporary path in WebKit converter settings. We already ensured the conversion with default and the above mentioned paths in Azure with WebKit HTML converter.

 

Please refer below UG links for more information.

UG: https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/webkit#temporary-path

Trouble shooting: https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/webkit#troubleshooting

 

Regards,

Karthikeyan 

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon