|
| The HTML to PDF Converter is a core component of the
HiQPdf Next Library for .NET, using a Chromium-based rendering engine
that enables accurate conversion of complex web pages to PDF with the latest HTML, CSS and JavaScript standards and technologies.
You can see the list of all HiQPdf Next components on the library page.
|
|
Compatibility Platforms
|
|
| HiQPdf Next for .NET can run on a variety of Windows and Linux platforms in web, console and
desktop applications across all modern .NET platforms.
The library components can be used in Azure App Service and Azure Functions environments
on both Windows and Linux. Deployment to Docker Windows and Linux containers is also supported.
|
|
| The .NET library targets .NET Standard 2.0, which makes it compatible with a wide range of .NET Core and .NET Framework
applications.
|
|
Getting Started
|
|
| The online documentation
contains Getting Started guides for Windows, Linux, Azure App Service and Azure Functions,
with detailed instructions for integrating the library into your application and complete C# examples
for each important feature of the library.
|
|
| You can see the current capabilities of the library by checking the
online demo application for this library
and the API reference in the online documentation.
|
|
Download Demo Application
|
|
|
You can also download a free trial package for .NET, which includes
an ASP.NET demo application project with complete C# source code as a starting point for experimenting with your own usage scenarios.
|
|
|
Running the samples in the demo application that involve HTML to PDF conversion features on Linux platforms
might require installing some dependency packages.
The documentation includes an entire section dedicated to building, publishing and running the demo application on multiple platforms.
|
|
NuGet Packages
|
|
|
For Windows deployments add a reference to the
HiQPdf.Next.HtmlToPdf.Windows
NuGet Package and for Linux deployments add a reference to the
HiQPdf.Next.HtmlToPdf.Linux
NuGet Package.
|
|
| The package for Windows is referenced by the
HiQPdf.Next.Windows
metapackage for all components and the package for Linux is referenced by the
HiQPdf.Next.Linux
metapackage for all components.
|
|
| There are also multiplatform metapackages that reference both the Windows and Linux HTML to PDF packages:
HiQPdf.Next.HtmlToPdf
for the HTML to PDF functionality and
HiQPdf.Next
for the entire HiQPdf Next library.
|
|
Installation
|
|
| The HTML to PDF Converter component uses a platform specific runtime.
On Windows platforms, the runtime generally does not require the installation of additional dependencies.
On Linux platforms installing some dependency packages might be necessary, depending on the exact version of Linux you are using.
In online documentation in
the Getting Started and Publish guides you can find instructions about Linux dependencies installation on a variety of Linux platforms.
|
|
HiQPdf.Next Namespace
|
|
| All components of the HiQPdf Next for .NET library share the same
HiQPdf.Next
namespace and can be used together in the same application.
To use the library in your own code, add the using directive at the top of your C# source file, as shown below.
|
|
// Include the HiQPdf.Next namespace at the top of your C# file
using HiQPdf.Next;
|
|
|
|
Sample Code
|
|
| After you add the reference to the NuGet package to your project, use the sample code below to convert a URL to a PDF document that you can either save to a file
or send to the browser for download.
|
|
// Create the HTML to PDF converter object
HtmlToPdf converter = new HtmlToPdf();
// Convert the HTML code to memory
string urlToConvert = "http://www.hiqpdf.com";
byte[] urlToPdfData = converter.ConvertUrlToMemory(urlToConvert);
FileResult fileResult = new FileContentResult(urlToPdfData, "application/pdf");
fileResult.FileDownloadName = "url_to_pdf.pdf";
return fileResult;
|
|
|
|
Features List
|
|
| HiQPdf Next for .NET offers advanced options for converting HTML to PDF and HTML to images. The library is more
than just an HTML to PDF converter. It can also automatically generate a PDF document outline with bookmarks,
set security permissions, password protect and digitally sign the generated PDF document.
|
|
|
Support for Cutting-Edge HTML, CSS and JavaScript Features
|
| Using Chromium as the rendering engine ensures that the latest
modern HTML, CSS, and JavaScript features are supported by the converter in conformance
with the latest standards and technologies.
|
|
|
|
Available on Both Windows and Linux Platforms
|
| HiQPdf Next for .NET can run on both Windows 64-bit and Linux 64-bit platforms.
There are different NuGet packages for Windows and Linux, including the same .NET library but with different
native runtimes. For Windows, the minimum required version is Windows 10 or Windows Server 2016.
|
|
|
|
Built for .NET Standard 2.0 for Maximum Compatibility
|
| The .NET library targets .NET Standard 2.0, making it compatible
with a wide range of .NET Core and .NET Framework applications. It is compatible with
.NET 10.0, 9.0, 8.0, 7.0, 6.0, .NET Standard 2.0 and .NET Framework 4.6.2 to 4.8.1.
|
|
|
|
Fully Compatible with Azure App Service and Azure Functions on Both Windows and Linux
|
| The converter can run without restrictions in your Azure App Service and Azure Functions
.NET Core applications targeting both Windows and Linux platforms. Web fonts and other features are fully supported
by HiQPdf Next for .NET.
Online documentation offers detailed usage instructions for Azure applications targeting both Windows and Linux.
|
|
|
|
NuGet Packages for Windows and Linux
|
| HiQPdf Next for .NET is delivered as NuGet packages for Windows and Linux.
The packages include the .NET Standard 2.0 library, the same for both platforms,
and the specific native runtime for each platform.
|
|
|
|
ASP.NET Core Demo Application with C# Code for All Features
|
| The zip package that can be downloaded from the website contains
the project for the ASP.NET Core demo application with C# sample code
for all major library features.
|
|
|
|
Simple and Flexible Licensing with a Single License for All Libraries
|
| The license for HiQPdf Next for .NET works with both the
classic HiQPdf Library for .NET and the multi-platform client-server solution.
There are no additional runtime or deployment costs charged for using our software
component in your applications.
|
|
|