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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ platform: document-processing
control: PDF
documentation: UG
---
# Converting HTML to PDF
# HTML to PDF Conversion Process

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.

Expand Down Expand Up @@ -273,7 +273,7 @@ Please refer to the below code snippet to use the DisableIEWarning API to remove

{% tabs %}

{% highlight c# tabtitle="C#" %}
{% highlight c# tabtitle="C# [Cross-platform]" %}

//Initialize the HTML to PDF converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.IE);
Expand All @@ -291,7 +291,8 @@ document.Close(true);

{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET" %}
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}

'Initialize the HTML to PDF converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.IE)
Dim settings As New IEConverterSettings()
Expand All @@ -308,10 +309,6 @@ 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.
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,31 @@ N> The HTML to PDF converter library internally uses the Blink rendering engine
</tr>
<tr>
<td>
Windows (.NET Core, .NET8, and .NET9)
Windows (.NET Core, NET 8.0, NET 9.0, NET 10.0)
</td>
<td>
{{'[Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows/)'| markdownify }}
</td>
</tr>
<tr>
<td>
Linux (.NET Core, .NET8, and .NET9)
Linux (.NET Core, NET 8.0, NET 9.0, NET 10.0)
</td>
<td>
{{'[Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Linux/)'| markdownify }}
</td>
</tr>
<tr>
<td>
Mac (.NET Core, .NET8, and .NET9)
Mac (.NET Core, NET 8.0, NET 9.0, NET 10.0)
</td>
<td>
{{'[Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Mac/)'| markdownify }}
</td>
</tr>
<tr>
<td>
AWS (.NET Core, .NET8, and .NET9)
AWS (.NET Core, NET 8.0, NET 9.0, NET 10.0)
</td>
<td>
{{'[Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Aws/)'| markdownify }}
Expand Down
58 changes: 46 additions & 12 deletions Document-Processing/PDF/PDF-Library/NET/Assemblies-Required.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ The following assemblies need to be referenced in your application based on the
Syncfusion.Pdf.UWP
</td>
</tr>
<tr>
<td>
{{'[Xamarin](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/create-pdf-file-in-xamarin)'| markdownify }}
</td>
<td>
Syncfusion.Pdf.Portable<br/>
Syncfusion.Compression.Portable
</td>
</tr>
<tr>
<td>
{{'[Blazor](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/create-pdf-document-in-blazor)'| markdownify }},
Expand Down Expand Up @@ -131,6 +122,15 @@ The following assemblies need to be referenced in your application based on the
Syncfusion.Compression.Base
</td>
</tr>
<tr>
<td>
{{'[Xamarin](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/create-pdf-file-in-xamarin)'| markdownify }}
</td>
<td>
Syncfusion.Pdf.Portable<br/>
Syncfusion.Compression.Portable
</td>
</tr>
<tr>
<td>
{{'[ASP.NET MVC (Classic)](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/create-pdf-file-in-asp-net-mvc)'| markdownify }}
Expand Down Expand Up @@ -254,7 +254,7 @@ For converting a Word document to PDF, the following assemblies need to be refer
</td>
</tr>
<tr>
<td>ASP.NET Core, Xamarin and Blazor</td>
<td>ASP.NET Core and Blazor</td>
<td>
Syncfusion.DocIO.Portable<br/>
Syncfusion.Compression.Portable<br/>
Expand Down Expand Up @@ -305,6 +305,18 @@ For converting a Word document to PDF, the following assemblies need to be refer
Syncfusion.DocToPdfConverter.Base
</td>
</tr>
<tr>
<td>Xamarin</td>
<td>
Syncfusion.DocIO.Portable<br/>
Syncfusion.Compression.Portable<br/>
Syncfusion.OfficeChart.Portable<br/>
Syncfusion.Pdf.Portable<br/>
Syncfusion.DocIORenderer.Portable<br/>
SkiaSharp.HarfBuzz<br/>
Syncfusion.SkiaSharpHelper.Portable
</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -344,7 +356,7 @@ For converting an Excel document to PDF, the following assemblies need to be ref
</td>
</tr>
<tr>
<td>UWP, .NET Core, Xamarin, and Blazor (Server-Side)</td>
<td>UWP, .NET Core and Blazor (Server-Side)</td>
<td>
Syncfusion.Compression.Portable<br/>
Syncfusion.XlsIO.Portable<br/>
Expand Down Expand Up @@ -387,6 +399,16 @@ For converting an Excel document to PDF, the following assemblies need to be ref
Syncfusion.ExcelToPDFConverter.Base
</td>
</tr>
<tr>
<td>Xamarin</td>
<td>
Syncfusion.Compression.Portable<br/>
Syncfusion.XlsIO.Portable<br/>
Syncfusion.Pdf.Portable<br/>
Syncfusion.SkiaSharpHelper.Portable<br/>
Syncfusion.XlsIORenderer.Portable
</td>
</tr>
</tbody>
</table>

Expand All @@ -413,7 +435,7 @@ For converting a PowerPoint Presentation to PDF, the following assemblies needed
</td>
</tr>
<tr>
<td>ASP.NET Core, Xamarin, and Blazor</td>
<td>ASP.NET Core and Blazor</td>
<td>
Syncfusion.Presentation.Portable<br/>
Syncfusion.Compression.Portable<br/>
Expand Down Expand Up @@ -480,6 +502,18 @@ The following assemblies are required to be referred in addition to the above me
Syncfusion.PresentationToPDFConverter.Base
</td>
</tr>
<tr>
<td>Xamarin</td>
<td>
Syncfusion.Presentation.Portable<br/>
Syncfusion.Compression.Portable<br/>
Syncfusion.OfficeChart.Portable<br/>
Syncfusion.Pdf.Portable<br/>
Syncfusion.PresentationRenderer.Portable<br/>
Syncfusion.SkiaSharpHelper.Portable<br/>
SkiaSharp
</td>
</tr>
</tbody>
</table>

Expand Down
67 changes: 24 additions & 43 deletions Document-Processing/PDF/PDF-Library/NET/NuGet-Packages-Required.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ Blazor
</tr>
<tr>
<td>
Xamarin
</td>
<td>
{{'[Syncfusion.Xamarin.Pdf.nupkg](https://www.nuget.org/packages/Syncfusion.Xamarin.Pdf/)'| markdownify }}
</td>
</tr>
<tr>
<td>
Windows UI (WinUI) <br/>
.NET Multi-platform App UI (.NET MAUI)
</td>
Expand Down Expand Up @@ -98,6 +90,14 @@ Windows UI (WinUI) <br/>
{{'[Syncfusion.Pdf.AspNet.nupkg]( https://www.nuget.org/packages/Syncfusion.Pdf.AspNet/)'| markdownify }}
</td>
</tr>
<tr>
<td>
Xamarin
</td>
<td>
{{'[Syncfusion.Xamarin.Pdf.nupkg](https://www.nuget.org/packages/Syncfusion.Xamarin.Pdf/)'| markdownify }}
</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -127,14 +127,6 @@ For advanced PDF features like compression, redaction, PDF/A conversion, image e
{{'[Syncfusion.Pdf.Imaging.Net.Core.nupkg](https://www.nuget.org/packages/Syncfusion.Pdf.Imaging.Net.Core)'| markdownify }}
</td>
</tr>
<tr>
<td>
Xamarin
</td>
<td>
{{'[Syncfusion.Xamarin.Pdf.Imaging.nupkg](https://www.nuget.org/packages/Syncfusion.Xamarin.Pdf.Imaging)'| markdownify }}
</td>
</tr>
<tr>
<td>
Windows UI (WinUI)
Expand Down Expand Up @@ -483,14 +475,6 @@ Console Application (Targeting .NET Core)
</tr>
<tr>
<td>
Xamarin
</td>
<td>
{{'[Syncfusion.Xamarin.XlsIORenderer.nupkg](https://www.nuget.org/packages/Syncfusion.Xamarin.XlsIORenderer/)'| markdownify }}
</td>
</tr>
<tr>
<td>
Blazor (Server-App)
</td>
<td>
Expand All @@ -517,6 +501,14 @@ Blazor (Server-App)
{{'[Syncfusion.ExcelToPdfConverter.AspNet.nupkg](https://www.nuget.org/packages/Syncfusion.ExcelToPdfConverter.AspNet/)'| markdownify }}
</td>
</tr>
<tr>
<td>
Xamarin
</td>
<td>
{{'[Syncfusion.Xamarin.XlsIORenderer.nupkg](https://www.nuget.org/packages/Syncfusion.Xamarin.XlsIORenderer/)'| markdownify }}
</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -566,14 +558,6 @@ Blazor
{{'[Syncfusion.PresentationRenderer.Net.Core.nupkg](https://www.nuget.org/packages/Syncfusion.PresentationRenderer.Net.Core/)'| markdownify }}
</td>
</tr>
<tr>
<td>
Xamarin
</td>
<td>
{{'[Syncfusion.Xamarin.PresentationRenderer.nupkg](https://www.nuget.org/packages/Syncfusion.Xamarin.PresentationRenderer/)'| markdownify }}
</td>
</tr>
</table>

### RETIRED PRODUCTS
Expand All @@ -594,6 +578,14 @@ Xamarin
{{'[Syncfusion.PresentationToPdfConverter.AspNet.nupkg](https://www.nuget.org/packages/Syncfusion.PresentationToPdfConverter.AspNet/)'| markdownify }}
</td>
</tr>
<tr>
<td>
Xamarin
</td>
<td>
{{'[Syncfusion.Xamarin.PresentationRenderer.nupkg](https://www.nuget.org/packages/Syncfusion.Xamarin.PresentationRenderer/)'| markdownify }}
</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -668,15 +660,4 @@ Install-package Syncfusion.Pdf.Net.Core
Uninstall-package Syncfusion.Pdf.Net.Core –RemoveDependencies
</td>
</tr>
<tr>
<td>
Xamarin
</td>
<td>
Install-package Syncfusion.Xamarin.Pdf
</td>
<td>
Uninstall-package Syncfusion.Xamarin.Pdf -RemoveDependencies
</td>
</tr>
</table>
Original file line number Diff line number Diff line change
Expand Up @@ -392,38 +392,6 @@ You can also resave the manipulated PDF document to the same file using overload

{% tabs %}

{% highlight c# tabtitle="ASP.NET Core" %}

//PDF doesn't supports saving a PDF document into the same file on the C#/.NET Cross platforms.

{% endhighlight %}

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

//Load an existing PDF document.
PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
//To-Do some manipulation
//To-Do some manipulation
//Resave the document to the same file.
loadedDocument.Save() ;

{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}

'Load an existing PDF document.
Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
'To-Do some manipulation
'To-Do some manipulation
'Resave the document to the same file.
loadedDocument.Save()

{% endhighlight %}

{% endtabs %}

{% tabs %}

{% highlight c# tabtitle="C# [Cross-platform]" %}

//PDF doesn't supports saving a PDF document into the same file on the C#/.NET Cross platforms.
Expand Down
4 changes: 2 additions & 2 deletions Document-Processing/PDF/PDF-Library/NET/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ documentation: UG

# Overview of PDF Framework

The PDF framework is a feature rich [.NET PDF class library](https://www.syncfusion.com/document-sdk/net-pdf-library) developed with 100% managed C# code that can be used to create, read and write PDF. The library can be used in [Windows Forms](https://www.syncfusion.com/document-sdk/net-pdf-library), [WPF](https://www.syncfusion.com/document-sdk/net-pdf-library), [ASP.NET Web Forms](https://www.syncfusion.com/document-sdk/net-pdf-library), [ASP.NET MVC](https://www.syncfusion.com/document-sdk/net-pdf-library), [ASP.NET Core](https://www.syncfusion.com/document-sdk/net-pdf-library), [Blazor](https://www.syncfusion.com/document-sdk/net-pdf-library), [UWP](https://www.syncfusion.com/document-sdk/net-pdf-library), [Xamarin](https://www.syncfusion.com/document-sdk/net-pdf-library), [Flutter](https://www.syncfusion.com/document-sdk/flutter-pdf-library), [WinUI](https://www.syncfusion.com/document-sdk/net-pdf-library) and [.NET MAUI](https://www.syncfusion.com/document-sdk/net-pdf-library) applications and Unity platform without the dependency of Adobe Acrobat. The creation of PDF follows the most popular PDF 1.7 (ISO 32000-1) and latest PDF 2.0 (ISO 32000-2) specifications.
The PDF framework is a feature rich [.NET PDF class library](https://www.syncfusion.com/document-sdk/net-pdf-library) developed with 100% managed C# code that can be used to create, read and write PDF. The library can be used in [Windows Forms](https://www.syncfusion.com/document-sdk/net-pdf-library), [WPF](https://www.syncfusion.com/document-sdk/net-pdf-library), [ASP.NET Web Forms](https://www.syncfusion.com/document-sdk/net-pdf-library), [ASP.NET MVC](https://www.syncfusion.com/document-sdk/net-pdf-library), [ASP.NET Core](https://www.syncfusion.com/document-sdk/net-pdf-library), [Blazor](https://www.syncfusion.com/document-sdk/net-pdf-library), [UWP](https://www.syncfusion.com/document-sdk/net-pdf-library), [Flutter](https://www.syncfusion.com/document-sdk/flutter-pdf-library), [WinUI](https://www.syncfusion.com/document-sdk/net-pdf-library) and [.NET MAUI](https://www.syncfusion.com/document-sdk/net-pdf-library) applications and Unity platform without the dependency of Adobe Acrobat. The creation of PDF follows the most popular PDF 1.7 (ISO 32000-1) and latest PDF 2.0 (ISO 32000-2) specifications.

## Key Features of Essential<sup>&reg;</sup> PDF

Expand All @@ -35,7 +35,7 @@ The following list shows the key features available in the Essential<sup>&reg;</
* Support to [text watermark](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-watermarks#adding-image-watermark-in-pdf-document), [image watermark](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-watermarks#adding-image-watermark-in-pdf-document), and [watermark annotation](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-watermarks#adding-watermark-annotation).
* Support to [hyperlinks](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-hyperlinks) for web navigation and document navigation.
* Support to [insert](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-bookmarks#inserting-bookmarks-in-an-existing-pdf), [remove](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-bookmarks#removing-bookmarks-from-an-existing-pdf), and [modify](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-bookmarks#modifying-the-bookmarks) bookmarks.
* Support to layers. [Add](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-layers#adding-layers-in-a-pdf-document), [remove](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-layers#removing-layers-from-an-existing-pdf-document), and [flatten](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-layers#flattening-the-layers-in-an-existing-pdf-document) the layers.
* Support to layers, [Add](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-layers#adding-layers-in-a-pdf-document), [remove](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-layers#removing-layers-from-an-existing-pdf-document), and [flatten](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-layers#flattening-the-layers-in-an-existing-pdf-document) the layers.
* Support to embed and manage [rich media content](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-annotations#rich-media-annotation) such as audio and video.
* Support to embed and execute [JavaScript](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-javascript) within PDF documents.
* Support to create and manage PDF [portfolios](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/working-with-portfolio).
Expand Down