Overview
Programming using DynamicPDF HTML Converter is as simple as calling a static method to convert your HTML to PDF. You have four different conversion options.
- URL to PDF (synchronous)
- URL to PDF (asynchronous)
- String to PDF (synchronous)
- String to PDF (asynchronous)
The Converter.Convert static method converts HTML to PDF synchronously while the Converter.ConvertAsync static method converts HTML to PDF asynchronously. Both methods also support outputting converted documents as byte arrays or as a file.
Features
DynamicPDF HTML Converter supports the following features for converting HTML to PDF.
- Converts HTML from URLs to PDF files.
- Converts HTML text to PDF files.
- It supports returning PDF output as byte data.
- Works in Linux.
- It supports HTML base tags.
- It supports JavaScript and CSS.
- It supports various conversion options, such as background images and page size.
Licensing
DynamicPDF HTML Converter is free to use if you accept a small footer stating "Created with the DynamicPDF Essentials Edition" and a link to the DynamicPDF website from a public area of your website.
Purchasing DynamicPDF HTML Converter removes the watermark and distribution limitations. See DynamicPDF HTML Converter for details.
Obtaining
Obtain DynamicPDF HTML Converter from Nuget or download directly.
Nuget
Download DynamicPDF HTML Converter from NuGet with the package ID : ceTe.DynamicPDF.HtmlConverter.NET. Refer to the DynamicPDF HTML Converter package information at Nuget.org for more details about this package.
Assemblies
You can also download the Assemblies as a zip file (click the Download Info button to access the assemblies). For more information on installing the assemblies directly, refer to Referencing the Assemblies.
Examples
On GitHub, you can find the project html-converter-dotnet-core illustrating how to use DynamicPDF HTML Converter.
TopIc | C# | VB.NET |
---|---|---|
Asynchronous Conversion | AsyncConversion.cs | AsyncConversion.vb |
Converting to Byte Array | ConvertToByteArray.cs | ConvertToByteArray.vb |
HTML Conversion | HtmlConversionUsingString.cs | HtmlConversionUsingString.vb |
Simple Conversion | SimpleConversion.cs | SimpleConversion.vb |
Conversion Options | WithConversionOptions.cs | WithConversionOptions.vb |
Namespace
DynamicPDF Html Converter for .NET uses the below namespace.