Skip to content

Commit ac2b624

Browse files
Merge pull request #1499 from syncfusion-content/985014-ug
985014-ug: Added Feedback content in HTML to PDF conversion.
2 parents 57cb1f4 + a3ab071 commit ac2b624

19 files changed

+691
-887
lines changed

Document-Processing-toc.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,6 +2284,12 @@
22842284
<li>
22852285
<a href="/document-processing/pdf/conversions/html-to-pdf/net/Converting-HTML-to-PDF">Overview</a>
22862286
</li>
2287+
<li>
2288+
<a href="/document-processing/pdf/conversions/html-to-pdf/net/Assemblies-Required">Assemblies Required</a>
2289+
</li>
2290+
<li>
2291+
<a href="/document-processing/pdf/conversions/html-to-pdf/net/NuGet-Packages-Required">NuGet Packages Required</a>
2292+
</li>
22872293
<li>
22882294
Getting Started
22892295
<ul>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Assemblies Required for HTML to PDF | Syncfusion
3+
description: This section details the Syncfusion assemblies required to implement HTML-to-PDF conversion functionality using the .NET PDF library.
4+
platform: document-processing
5+
control: PDF
6+
documentation: UG
7+
keywords: Assemblies
8+
---
9+
# Assemblies Required for HTML to PDF Conversion
10+
11+
Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for [Windows](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#windows), [Linux](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#linux), and [Mac](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#mac) respectively. Please refer to the [advanced installation](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation) steps for more details.
12+
13+
<table>
14+
<thead>
15+
<tr>
16+
<th>Platforms</th>
17+
<th>Assemblies</th>
18+
</tr>
19+
</thead>
20+
<tbody>
21+
<tr>
22+
<td>
23+
WinForms<br/>
24+
WPF<br/>
25+
ASP.NET MVC
26+
</td>
27+
<td>
28+
<ul>
29+
<li>Syncfusion.Compression.Base.dll</li>
30+
<li>Syncfusion.Pdf.Base.dll</li>
31+
<li>Syncfusion.HtmlConverter.Base.dll</li>
32+
<li>Newtonsoft.Json package (v13.0.1 or above)</li>
33+
</ul>
34+
</td>
35+
</tr>
36+
<tr>
37+
<td>
38+
.NET/.NET Core<br/>
39+
Blazor
40+
</td>
41+
<td>
42+
<ul>
43+
<li>Syncfusion.Compression.Portable.dll</li>
44+
<li>Syncfusion.Pdf.Portable.dll</li>
45+
<li>Syncfusion.HtmlConverter.Portable.dll</li>
46+
<li>Newtonsoft.Json package (v13.0.1 or above)</li>
47+
</ul>
48+
</td>
49+
</tr>
50+
</tbody>
51+
</table>
52+
53+
**RETIRED PRODUCTS**
54+
55+
<table>
56+
<thead>
57+
<tr>
58+
<th>Platform(s)</th>
59+
<th>Assembly</th>
60+
</tr>
61+
</thead>
62+
<tbody>
63+
<tr>
64+
<td>
65+
ASP.NET
66+
</td>
67+
<td>
68+
<ul>
69+
<li>Syncfusion.Compression.Base.dll</li>
70+
<li>Syncfusion.Pdf.Base.dll</li>
71+
<li>Syncfusion.HtmlConverter.Base.dll</li>
72+
<li>Newtonsoft.Json package (v13.0.1 or above)</li>
73+
</ul>
74+
</td>
75+
</tr>
76+
</tbody>
77+
</table>
78+
79+
N> HTML to PDF conversion is not supported in .NET MAUI, Xamarin, and UWP applications.
80+

Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-AWS-Elastic-Beanstalk.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public IActionResult BlinkToPDF()
7171
MemoryStream stream = new MemoryStream();
7272
//Save the document to the memory stream.
7373
document.Save(stream);
74+
//Close the document
75+
document.Close(true);
7476
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "BlinkLinuxDockerAWSBeanstalk.pdf");
7577
}
7678

Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-App-Service-Linux-with-docker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public ActionResult ExportToPDF()
8484
MemoryStream stream = new MemoryStream();
8585
//Save and close a PDF document.
8686
document.Save(stream);
87+
document.Close(true);
8788
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "URL_to_PDF.pdf");
8889
}
8990

Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-Function-App-Container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post
6464
ms = new MemoryStream();
6565
// Save and close the PDF document
6666
document.Save(ms);
67-
document.Close();
67+
document.Close(true);
6868
}
6969
catch (Exception ex)
7070
{

Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Converting-HTML-to-PDF.md

Lines changed: 3 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ platform: document-processing
55
control: PDF
66
documentation: UG
77
---
8-
# Converting HTML to PDF
8+
# Converting HTML to a PDF Document
99

1010
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.
1111

@@ -33,146 +33,6 @@ Syncfusion<sup>&reg;</sup> HTML-to-PDF converter will work seamlessly in various
3333
* Compatible with .NET Framework 4.5 and above.
3434
* Compatible with .NET Core 2.0 and above.
3535

36-
## Install HTML to PDF .NET library to your project
37-
38-
Include the HTML to PDF converter in your project using two approaches.
39-
* NuGet packages (Recommended)
40-
* Assemblies.
41-
42-
### NuGet Packages Required (Recommended)
43-
44-
Directly install the NuGet packages to your .NET application from [nuget.org](https://www.nuget.org/).
45-
46-
N> The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.
47-
48-
<table>
49-
<tr>
50-
<thead>
51-
<th><b>Platform(s)</b></th>
52-
<th><b>NuGet Package</b></th>
53-
</thead>
54-
</tr>
55-
<tr>
56-
<td>
57-
(.NET Core, .NET 8, .NET 9) Windows
58-
</td>
59-
<td>
60-
{{'[Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows/)'| markdownify }}
61-
</td>
62-
</tr>
63-
<tr>
64-
<td>
65-
(.NET Core, .NET 8, .NET 9) Linux
66-
</td>
67-
<td>
68-
{{'[Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Linux/)'| markdownify }}
69-
</td>
70-
</tr>
71-
<tr>
72-
<td>
73-
(.NET Core, .NET 8, .NET 9) Mac
74-
</td>
75-
<td>
76-
{{'[Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Mac/)'| markdownify }}
77-
</td>
78-
</tr>
79-
<tr>
80-
<td>
81-
(.NET Core, .NET 8, .NET 9) AWS
82-
</td>
83-
<td>
84-
{{'[Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Aws/)'| markdownify }}
85-
</td>
86-
</tr>
87-
</table>
88-
89-
Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.
90-
91-
<table>
92-
<tr>
93-
<thead>
94-
<th><b>Platform(s)</b></th>
95-
<th><b>NuGet Package</b></th>
96-
</thead>
97-
</tr>
98-
<tr>
99-
<td>
100-
Windows Forms
101-
</td>
102-
<td>
103-
{{'[Syncfusion.HtmlToPdfConverter.WinForms.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.WinForms/)'| markdownify }}
104-
</td>
105-
</tr>
106-
<tr>
107-
<td>
108-
WPF
109-
</td>
110-
<td>
111-
{{'[Syncfusion.HtmlToPdfConverter.Wpf.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Wpf/)'| markdownify }}
112-
</td>
113-
</tr>
114-
<tr>
115-
<td>
116-
ASP.NET
117-
</td>
118-
<td>
119-
{{'[Syncfusion.HtmlToPdfConverter.AspNet.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.AspNet/)'| markdownify }}
120-
</td>
121-
</tr>
122-
<tr>
123-
<td>
124-
ASP.NET MVC
125-
</td>
126-
<td>
127-
{{'[Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.AspNet.Mvc5/)'| markdownify }}
128-
</td>
129-
</tr>
130-
</table>
131-
132-
### Assemblies Required
133-
134-
Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for [Windows](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#windows), [Linux](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#linux), and [Mac](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#mac), respectively. Please refer to the [advanced installation](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation) steps for more details.
135-
136-
<table>
137-
<tr>
138-
<thead>
139-
<th>
140-
Platforms</th>
141-
<th>
142-
Assemblies
143-
</th>
144-
</thead>
145-
</tr>
146-
<tr>
147-
<td>
148-
WinForms
149-
WPF
150-
ASP.NET
151-
ASP.NET MVC
152-
</td>
153-
<td>
154-
<ul>
155-
<li>Syncfusion.Compression.Base.dll</li>
156-
<li>Syncfusion.Pdf.Base.dll</li>
157-
<li>Syncfusion.HtmlConverter.Base.dll</li>
158-
<li>Newtonsoft.Json package (v13.0.1 or above)</li>
159-
</ul>
160-
</td></tr>
161-
<tr>
162-
<td>
163-
.NET/.NET Core
164-
Blazor
165-
</td>
166-
<td>
167-
<ul>
168-
<li>Syncfusion.Compression.Portable.dll</li>
169-
<li>Syncfusion.Pdf.Portable.dll</li>
170-
<li>Syncfusion.HtmlConverter.Portable.dll</li>
171-
<li>Newtonsoft.Json package (v13.0.1 or above)</li>
172-
</ul>
173-
</td></tr>
174-
</table>
175-
17636
## Get Started with HTML to PDF conversion
17737

17838
### Convert HTML to PDF in C#
@@ -213,10 +73,9 @@ blinkConverterSettings.ViewPortSize = new Syncfusion.Drawing.Size(1280, 0);
21373
htmlConverter.ConverterSettings = blinkConverterSettings;
21474
//Convert URL to PDF document.
21575
PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
216-
//Create a filestream.
217-
FileStream fileStream = new FileStream("HTML-to-PDF.pdf", FileMode.CreateNew, FileAccess.ReadWrite);
76+
21877
//Save and close the PDF document.
219-
document.Save(fileStream);
78+
document.Save("Output.pdf");
22079
document.Close(true);
22180

22281
{% endhighlight %}

0 commit comments

Comments
 (0)