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.
Unfortunately, activation email could not send to your email. Please try again.

How to convert HTML form to PDF form using WebKit HTML converter

Converting HTML form to PDF form is possible by using WebKit based HTML to PDF converter, please use the below code snippet to achieve this.

Assemblies Required

  1. Syncfusion.Compression.Base.dll
  2. Syncfusion.HtmlConverter.Base.dll
  3. Syncfusion.Pdf.Base.dll
  4. QtBinaries folder

All the above mentioned assemblies can be get by installing the WebKit installer available in the below link.

WebKit HTML Converter: https://www.syncfusion.com/downloads/latest-version

Feature Supported version: 14.3.0.49 and later

Code snippet:

C#

// Create a HTML to PDF converter object with default settings

HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);

WebKitConverterSettings webKitSettings = new WebKitConverterSettings();

 

//Set WebKit path

webKitSettings.WebKitPath = @"../QtBinaries";

            

//Set Enable form to convert HTML form to PDF form

webKitSettings.EnableForm = true;

 

htmlConverter.ConverterSettings = webKitSettings;

 

//Convert URL to pdf using the settings above

PdfDocument document = htmlConverter.Convert("Input.html");

            

// Save and close the document.

document.Save("Sample.pdf");

document.Close(true);

 

 

Working Sample can be downloaded from the below link.

http://www.syncfusion.com/downloads/support/directtrac/general/HTMLFO~1-1168042960.ZIP

Article ID: Published Date: Last Revised Date: Platform: Control:
7252 01/25/2017 01/25/2017 ASP.NET MVC (Classic) PDF
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.