Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Document-Processing/Data-Extraction/OCR/NET/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ N> Starting with v20.1.0.x, if you reference Syncfusion<sup>&reg;</sup> OCR proc
* Image into searchable PDF or PDF/A.
* Improved accessibility.
* Post-processing.
* Compatible with .NET Framework 4.5 and above.
* Compatible with .NET Framework 4.6.2 and above.
* Compatible with .NET Core 2.0 and above.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ documentation: UG
---
# Converting HTML to PDF

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.
The [HTML to PDF converter](https://www.syncfusion.com/document-sdk/net-pdf-library/html-to-pdf) is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

Syncfusion<sup>&reg;</sup> HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

Expand Down Expand Up @@ -200,8 +200,6 @@ using Syncfusion.HtmlConverter;

Step 4: Use the following code sample to convert the URL to PDF in the program.cs.

{% tabs %}

{% highlight c# tabtitle="C#" %}

//Initialize HTML to PDF converter.
Expand All @@ -221,8 +219,6 @@ document.Close(true);

{% endhighlight %}

{% endtabs %}

By executing the program, you will get the PDF document as follows.
<img src="htmlconversion_images/htmltopdfoutput.png" alt="htmltopdfoutput" width="100%" Height="Auto"/>

Expand Down Expand Up @@ -271,8 +267,6 @@ By default, the PDF document generated with the IE rendering engine comes with t
<img src="htmlconversion_images/IEWarning.png" alt="IEWarning" width="100%" Height="Auto"/>
Please refer to the below code snippet to use the DisableIEWarning API to remove the default IE warning from the PDF document.

{% tabs %}

{% highlight c# tabtitle="C#" %}

//Initialize the HTML to PDF converter
Expand All @@ -291,27 +285,4 @@ document.Close(true);

{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET" %}
'Initialize the HTML to PDF converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.IE)
Dim settings As New IEConverterSettings()
'Disable Default IE Warning Message
settings.DisableIEWarning = true
'Assign IE settings to HTML converter
htmlConverter.ConverterSettings = settings
'Convert URL to PDF
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")

'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)

{% endhighlight %}

{% highlight c# tabtitle="ASP.NET Core" %}
//Currently, IE rendering engine does not support conversion in .NET Core platform
{% endhighlight %}

{% endtabs %}

N>Please try our [Blink](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/net-core) engine to improve the quality and accuracy of the HTML to PDF conversion.
Loading