Winnovative PDF Next for .NET Overview

Winnovative PDF Next for .NET is a library that can be integrated into any type of .NET application to create and process PDF documents.

You can create PDF documents, convert HTML, Word, Excel, RTF and Markdown documents to PDF, extract text and images from existing PDF documents, perform text search operations on PDF documents and convert PDF pages to images.

Compatibility

The library targets .NET Standard 2.0, so it can be used in any .NET Core or .NET Framework application compatible with this standard. The library can run on Windows and Linux 64 bit operating systems.

The software is compatible with Azure App Service and Azure Functions from Microsoft on both Windows and Linux.

It is also compatible with Docker containers running on Windows and Linux with example Dockerfiles available in dedicated sections of the documentation.

The documentation provides additional details about compatibility and installation instructions for each supported platform.

Library Components

The library has a architecture structure, with separate NuGet packages for each major component to prevent unnecessary files from being included in your applications. All components share the same Winnovative.Pdf.Next namespace and can be used together within the same project.

Core Component

The Core component provides the API for programmatically creating, manipulating and protecting PDF documents.

To use the Core component in applications targeting Windows, reference the Winnovative.Pdf.Next.Core.Windows NuGet package.

For applications targeting Linux, reference the Winnovative.Pdf.Next.Core.Linux NuGet package.

For applications targeting multiple platforms reference the Winnovative.Pdf.Next.Core NuGet metapackage, which references the platform specific Core packages for Windows and Linux.

You can find a detailed description of this component in the Core Component Overview documentation section.

HTML to PDF Converter Component

The HTML to PDF Converter component uses a Chromium based rendering engine capable of processing modern HTML, CSS and JavaScript content in compliance with the latest standards.

The HTML to PDF Converter combines the powerful print friendly PDF format with the flexibility of HTML providing a modern tool for creating well formatted and easily maintainable PDF reports and documents.

The HTML to PDF Converter component is delivered as separate NuGet packages for Windows and Linux. HTML to PDF functionality is also used internally by other components of the library to provide advanced features such as adding HTML headers, footers and templates.

To use the HTML to PDF Converter component in applications targeting Windows, reference the Winnovative.Pdf.Next.HtmlToPdf.Windows NuGet package.

For applications targeting Linux, reference the Winnovative.Pdf.Next.HtmlToPdf.Linux NuGet package.

For applications targeting multiple platforms reference the Winnovative.Pdf.Next.HtmlToPdf NuGet metapackage, which references the platform specific packages for Windows and Linux.

The HTML to PDF Converter packages reference the corresponding Core packages, so there is no need to explicitly reference the Core packages when referencing the HTML to PDF Converter package.

You can find a detailed description of this component in the HTML to PDF Converter Overview documentation section.

Word to PDF Component

The Word to PDF Converter component allows you to convert DOCX Word documents to PDF.

The Word to PDF Converter component is delivered as separate NuGet packages for Windows and Linux.

To use the Word to PDF Converter component in applications targeting Windows, reference the Winnovative.Pdf.Next.WordToPdf.Windows NuGet package.

For applications targeting Linux, reference the Winnovative.Pdf.Next.WordToPdf.Linux NuGet package.

For applications targeting multiple platforms reference the Winnovative.Pdf.Next.WordToPdf NuGet metapackage, which references the platform specific packages for Windows and Linux.

The Word to PDF Converter packages reference the corresponding Core packages, so there is no need to explicitly reference the Core packages when referencing the Word to PDF Converter package.

You can find a detailed description of this component in the Convert Word DOCX to PDF documentation section.

Excel to PDF Component

The Excel to PDF Converter component allows you to convert XLSX Excel documents to PDF.

The Excel to PDF Converter component is delivered as separate NuGet packages for Windows and Linux.

To use the Excel to PDF Converter component in applications targeting Windows, reference the Winnovative.Pdf.Next.ExcelToPdf.Windows NuGet package.

For applications targeting Linux, reference the Winnovative.Pdf.Next.ExcelToPdf.Linux NuGet package.

For applications targeting multiple platforms reference the Winnovative.Pdf.Next.ExcelToPdf NuGet metapackage, which references the platform specific packages for Windows and Linux.

The Excel to PDF Converter packages reference the corresponding Core packages, so there is no need to explicitly reference the Core packages when referencing the Excel to PDF Converter package.

You can find a detailed description of this component in the Convert Excel XLSX to PDF documentation section.

RTF to PDF Component

The RTF to PDF Converter component allows you to convert RTF documents to PDF.

The RTF to PDF Converter component is delivered as separate NuGet packages for Windows and Linux.

To use the RTF to PDF Converter component in applications targeting Windows, reference the Winnovative.Pdf.Next.RtfToPdf.Windows NuGet package.

For applications targeting Linux, reference the Winnovative.Pdf.Next.RtfToPdf.Linux NuGet package.

For applications targeting multiple platforms reference the Winnovative.Pdf.Next.RtfToPdf NuGet metapackage, which references the platform specific packages for Windows and Linux.

The RTF to PDF Converter packages reference the corresponding Core packages, so there is no need to explicitly reference the Core packages when referencing the RTF to PDF Converter package.

You can find a detailed description of this component in the Convert RTF to PDF documentation section.

Markdown to PDF Component

The Markdown to PDF Converter component allows you to convert Markdown documents to PDF.

The Markdown to PDF Converter component is delivered as separate NuGet packages for Windows and Linux.

To use the Markdown to PDF Converter component in applications targeting Windows, reference the Winnovative.Pdf.Next.MarkdownToPdf.Windows NuGet package.

For applications targeting Linux, reference the Winnovative.Pdf.Next.MarkdownToPdf.Linux NuGet package.

For applications targeting multiple platforms reference the Winnovative.Pdf.Next.MarkdownToPdf NuGet metapackage, which references the platform specific packages for Windows and Linux.

The Markdown to PDF Converter packages reference the corresponding Core packages, so there is no need to explicitly reference the Core packages when referencing the Markdown to PDF Converter package.

You can find a detailed description of this component in the Convert Markdown to PDF documentation section.

PDF Processor Component

The PDF Processor component provides functionality for processing existing PDF documents. It includes the PDF to Text and PDF Text Search functionalities as well as the PDF to Image and PDF Image Extraction functionalities.

To use the PDF Processor component in applications targeting Windows, reference the Winnovative.Pdf.Next.PdfProcessor.Windows NuGet package.

For applications targeting Linux, reference the Winnovative.Pdf.Next.PdfProcessor.Linux NuGet package.

For applications targeting multiple platforms reference the Winnovative.Pdf.Next.PdfProcessor NuGet metapackage, which references the platform specific packages for Windows and Linux.

The PDF Processor packages reference the corresponding Core packages, so there is no need to explicitly reference the Core packages when referencing the PDF Processor package.

PDF to Text Component

The PDF to Text component allows you to extract text from existing PDF documents and to search for text within them. It is part of the PDF Processor component and is delivered through the same NuGet package, as described in the PDF Processor section.

You can find a detailed description of this component in the Convert PDF to Text and Search for Text in PDF documentation sections.

PDF to Image Component

The PDF to Image component allows you to convert PDF pages to PNG images. It is part of the PDF Processor component and is delivered through the same NuGet package, as described in the PDF Processor section.

You can find a detailed description of this component in the Convert PDF Pages to Images documentation section.

PDF Images Extractor Component

The PDF Images Extractor component allows you to extract the images embedded in existing PDF documents. It is part of the PDF Processor component and is delivered through the same NuGet package, as described in the PDF Processor section.

You can find a detailed description of this component in the Extract Images from PDF documentation sections.

Meta Packages for All Components

Besides the component specific packages, the library also provides metapackages that reference the packages for all components.

To use all the components in applications targeting Windows, reference the Winnovative.Pdf.Next.Windows NuGet package.

For applications targeting Linux, reference the Winnovative.Pdf.Next.Linux NuGet package.

For applications targeting multiple platforms reference the Winnovative.Pdf.Next NuGet package, which references the platform specific packages for Windows and Linux.

Winnovative.Pdf.Next Namespace

All components of the library share the same Winnovative.Pdf.Next namespace and can be used together in the same application.

At the top of your C# source file add the using Winnovative.Pdf.Next; statement to make the Winnovative PDF Next API available in your .NET application.

C#
// add this using statement at the top of your C# file
using Winnovative.Pdf.Next;

Sample C# Code to Convert an HTML String to PDF

With the code below, you can convert an HTML string to a PDF document in a memory buffer, and then save the data from the buffer to a file.

C#
// create the converter object in your code where you want to run conversion
HtmlToPdfConverter converter = new HtmlToPdfConverter();

// convert an HTML string to a memory buffer
byte[] htmlToPdfBuffer = converter.ConvertHtml("<b>Hello World</b> from Winnovative !", null);

// write the data from the memory buffer to a PDF file
System.IO.File.WriteAllBytes("HtmlToMemory.pdf", htmlToPdfBuffer);

Convert a URL to PDF

The example below shows how to convert a URL to a PDF document in a memory buffer and then save the data from the buffer to a file. The URL can also be a local file path prefixed with the file:// URI scheme.

C#
// create the converter object where you want to perform the conversion
HtmlToPdfConverter converter = new HtmlToPdfConverter();

// convert a URL to a memory buffer
string htmlPageURL = "http://www.winnovative-software.com";
byte[] urlToPdfBuffer = converter.ConvertUrl(htmlPageURL);

// write the data from the memory buffer to a PDF file
System.IO.File.WriteAllBytes("UrlToMemory.pdf", urlToPdfBuffer);

Getting Started on Windows and Linux Platforms

The documentation provides detailed instructions for getting started with Winnovative PDF Next for .NET on Windows and Linux, as well as in environments such as Azure App Service, Azure Functions and Docker containers for both platforms.

See Also