HiQPdf Library for .NET (Classic) is a fast and flexible tool for creating high-quality PDF documents and converting HTML to PDF in .NET Framework, .NET Core and .NET Standard applications. The library uses the Classic rendering engine to convert HTML to PDF, images and SVG. You can also create, stamp, secure, merge and split PDF documents, extract text and images from PDF documents, search text in PDF, convert PDF pages to images or HTML. This package is compatible with .NET Framework, .NET Core and .NET Standard 2.0 on Windows platforms. For applications that need to run on both Windows and Linux platforms, the HiQPdf.Next.HtmlToPdf package provides a newer and highly accurate rendering engine designed for modern HTML, CSS and JavaScript content. The full HiQPdf.Next package allows you to create, edit and merge PDF documents, convert HTML to PDF or images, convert Word, Excel, RTF and Markdown to PDF, convert PDF to text or images. The compatibility list includes the following .NET versions, platforms and application types: * .NET Framework 2.0, 3.5, 4.0 and above * .NET 10, 9, 8, 7, 6 * .NET Standard 2.0 * Windows platforms * Azure Cloud Services and Azure Virtual Machines * Web, Console and Desktop applications Library Features: * HTML to PDF to quickly create PDF documents from HTML * HTML to Image and HTML to SVG converters * PDF to Image to rasterize PDF document pages to images * PDF to HTML to create HTML documents from PDF pages * PDF to Text to extract text from PDF documents * Search text in PDF documents * Extract images from PDF documents * Create PDF documents with text, HTML, SVG, images and graphics * Create encrypted, password-protected, digitally signed PDF documents * Create PDF documents with forms, text notes, links and JavaScript actions * Merge multiple PDF documents into a single one * Stamp PDF with HTML, text and images Documentation and code samples: https://www.hiqpdf.com/hiqpdf-dotnet
$ dotnet add package HiQPdfPDF Library for .NET | HTML to PDF for .NET | Free Trial Download | Licensing
HiQPdf Library for .NET (Classic) is a fast and flexible tool for creating high-quality PDF documents and converting HTML to PDF in .NET Framework, .NET Core and .NET Standard applications.
The library uses the Classic rendering engine to convert HTML to PDF, images and SVG.
You can also create, stamp, secure, merge and split PDF documents, extract text and images from PDF documents, search text in PDF documents, convert PDF pages to images or HTML.
This package is compatible with .NET Framework, .NET Core and .NET Standard 2.0 on Windows platforms.
For applications that need to convert HTML to PDF on both Windows and Linux platforms, the HiQPdf.Next.HtmlToPdf library provides a newer and highly accurate rendering engine designed for modern HTML, CSS and JavaScript content.
The full HiQPdf Next package HiQPdf.Next can be used on Windows, Linux, Azure and Docker platforms to create, edit and merge PDF documents, convert HTML to PDF or images, convert Word, Excel, RTF and Markdown to PDF, extract text and images from PDFs, search text in PDFs and convert PDF pages to images.
The compatibility list includes the following .NET versions, platforms and application types:
You can start by copying the C# code below into your application or you can start with our demo applications for .NET from downloadable product packages.
The C# code samples below show how to quickly produce PDF documents from HTML pages or HTML code and save the resulting PDF to a memory buffer, to a PDF file or send it to the browser for download when created in ASP.NET applications.
At the top of your C# source file you have to add the using HiQPdf; instruction to make available the HiQPdf namespace to your application code.
using HiQPdf;
You can use the C# code below to convert an HTML code or an HTML page from a given URL to a PDF file.
// Create the HTML to PDF converter object
HtmlToPdf converter = new HtmlToPdf();
// Convert the HTML code to a PDF file
converter.ConvertHtmlToFile("<b>Hello World</b> from HiQPdf !", null, "html_to_file.pdf");
// Convert the HTML page from URL to a PDF file
string urlToConvert = "https://www.hiqpdf.com";
converter.ConvertUrlToFile(urlToConvert, "url_to_file.pdf");
Alternatively you can produce the PDF document in a memory buffer that you can further save to a file on the server.
// Create the HTML to PDF converter object
HtmlToPdf converter = new HtmlToPdf();
// Convert the HTML code to memory
byte[] htmlToPdfData = converter.ConvertHtmlToMemory("<b>Hello World</b> from HiQPdf !", null);
// Save the PDF data to a file
System.IO.File.WriteAllBytes("html_to_memory.pdf", htmlToPdfData);
// Convert the HTML page from URL to memory
string urlToConvert = "https://www.hiqpdf.com";
byte[] urlToPdfData = converter.ConvertUrlToMemory(urlToConvert);
// Save the PDF data to a file
System.IO.File.WriteAllBytes("url_to_memory.pdf", urlToPdfData);
The C# code below can be used in your ASP.NET Core and ASP.NET MVC application for .NET Framework to convert an HTML code to PDF in a memory buffer and then send the PDF data for download to the browser.
// Create the HTML to PDF converter object
HtmlToPdf converter = new HtmlToPdf();
// Convert the HTML code to memory
byte[] htmlToPdfData = converter.ConvertHtmlToMemory("<b>Hello World</b> from HiQPdf !", null);
FileResult fileResult = new FileContentResult(htmlToPdfData, "application/pdf");
fileResult.FileDownloadName = "html_to_pdf.pdf";
return fileResult;
The C# code below can be used in your ASP.NET Web Forms application for .NET Framework to convert an HTML code to PDF in a memory buffer and then send the PDF data for download to the browser.
// Create the HTML to PDF converter object
HtmlToPdf converter = new HtmlToPdf();
// Convert the HTML code to memory
byte[] htmlToPdfData = converter.ConvertHtmlToMemory("<b>Hello World</b> from HiQPdf !", null);
HttpResponse httpResponse = HttpContext.Current.Response;
httpResponse.AddHeader("Content-Type", "application/pdf");
httpResponse.AddHeader("Content-Disposition",
String.Format("attachment; filename=html_to_pdf.pdf; size={0}",
htmlToPdfData.Length.ToString()));
httpResponse.BinaryWrite(htmlToPdfData);
httpResponse.End();
The C# code below can be used in your ASP.NET Core application to convert an HTML code to PDF in a memory buffer and then send the PDF data for download to the browser.
// Create the HTML to PDF converter object
HtmlToPdf converter = new HtmlToPdf();
// Convert the HTML code to memory
byte[] htmlToPdfData = converter.ConvertHtmlToMemory("<b>Hello World</b> from HiQPdf !", null);
FileResult fileResult = new FileContentResult(htmlToPdfData, "application/pdf");
fileResult.FileDownloadName = "html_to_pdf.pdf";
return fileResult;
You can download the HiQPdf Library for .NET evaluation package from HiQPdf Downloads web page.
The evaluation package for .NET contains the product binaries and demo web, desktop and console projects with full C# code for .NET Framework and .NET Core.
The licensing model is simple and flexible. The licenses are perpetual and there is no limit for the number of machines where you can deploy your applications using the HiQPdf library. You can find more details about licensing on Online Purchase web page.
For support and questions please use the email addresses from the contact web page.