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.
Winnovative PDF Next for .NET runs natively on 64-bit Linux operating systems.
The .NET library targets .NET Standard 2.0, so it can be used in any .NET Core or .NET Framework application that supports this standard.
Depending on your Linux distribution and installed system packages, you may need to install additional dependencies for the HTML to PDF Converter component to run properly. The other components of the library do not have additional dependencies.
To achieve rendering results similar to Windows, especially when converting pages that use fonts commonly available on Windows, it is recommended to install the Microsoft Core Fonts package on distributions that support it, such as Ubuntu and Debian.
The software is fully compatible with Azure App Service, Azure Functions and Docker containers on Linux. Separate documentation covers deployment to these platforms.
The library structure is modular, with separate NuGet packages for major components to prevent unnecessary files from being included in your applications. You can choose to reference a single package to install all the components of the library or you can install only the components you need.
To install all components of the Winnovative PDF Next library, add a reference to the Winnovative.Pdf.Next.Linux meta-package from NuGet.
The metapackage references the packages for all library components, including the HTML to PDF converter, Word to PDF, Excel to PDF, RTF to PDF and Markdown to PDF conversion components, as well as the PDF text extraction and text search functionalities, the PDF to Image converter and the PDF Images Extractor. This can bring many files into your project and you may prefer to use only specific components.
To install only specific components of the Winnovative PDF Next library, you can add references to the corresponding NuGet packages from NuGet.
To use only the Core component, you can install the Winnovative.Pdf.Next.Core.Linux NuGet package.
To use only the HTML to PDF Converter component, you can install the Winnovative.Pdf.Next.HtmlToPdf.Linux NuGet package.
To use the Word to PDF, Excel to PDF, RTF to PDF or Markdown to PDF conversion components, install the corresponding package: Winnovative.Pdf.Next.WordToPdf.Linux, Winnovative.Pdf.Next.ExcelToPdf.Linux, Winnovative.Pdf.Next.RtfToPdf.Linux or Winnovative.Pdf.Next.MarkdownToPdf.Linux .
To use the PDF Processor components PDF to Text, PDF Text Search, PDF to Image and PDF Images Extraction, you only need to install the Winnovative.Pdf.Next.PdfProcessor.Linux NuGet package.
Any combination of these packages can be installed in your project, depending on which components you want to use.
All components of the library share the same Winnovative.Pdf.Next namespace and can be used together in the same application.
After the NuGet package has been installed, add the using Winnovative.Pdf.Next; directive at the top of your C# source file to include the Winnovative.Pdf.Next namespace and make the library API available.
// add this using statement at the top of your C# file
using Winnovative.Pdf.Next;You are now ready to use the Winnovative PDF Next library API in your .NET application targeting the Linux operating system.
The HTML to PDF Converter component for Linux requires installing several system packages and optionally the Microsoft Core Fonts. The other components don't require any additional setup.
Required system packages vary slightly by distribution. Below are examples for the most common ones.
On Ubuntu 20.04, Ubuntu 22.04, Ubuntu 24.04, Ubuntu 25.04 or Debian 12, run:
sudo apt update && sudo apt install -y libnss3 libatk-bridge2.0-0 libcairo2 libpango-1.0-0On RedHat 9.5 or Amazon Linux 2023, run:
sudo dnf install -y nss at-spi2-atk cairo pangoIf your HTML pages use fonts commonly used on Windows, installing Microsoft Core Fonts is recommended for consistent rendering.
This package is officially supported on some distributions, such as Ubuntu and Debian. On other systems, it might not be available or may require manual installation.
If the ttf-mscorefonts-installer package is available (e.g., on Ubuntu virtual machines from Azure), run:
sudo apt update && sudo apt install ttf-mscorefonts-installer && sudo apt install fontconfig && sudo fc-cache -f -vTo automatically accept the license agreement and install the package, use:
echo 'ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true' | sudo debconf-set-selections && sudo apt update && sudo apt install -y ttf-mscorefonts-installer fontconfig && sudo fc-cache -f -vIf the ttf-mscorefonts-installer package is not available in your distribution, download and install it manually:
wget -O /tmp/ttf-mscorefonts-installer_3.8_all.deb http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.8_all.deb && sudo apt install -y /tmp/ttf-mscorefonts-installer_3.8_all.deb fontconfig && sudo fc-cache -f -vAnd to accept the license automatically when installing manually:
wget -O /tmp/ttf-mscorefonts-installer_3.8_all.deb http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.8_all.deb && echo 'ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true' | sudo debconf-set-selections && sudo apt install -y /tmp/ttf-mscorefonts-installer_3.8_all.deb fontconfig && sudo fc-cache -f -vBefore running the HTML to PDF Converter on Linux, ensure that the winnovative_runtimes/linux-x64/native/winnovative_loadhtml file has execution permissions.
This file is automatically copied to your application's output directory after the NuGet package is installed and the project is built.
To grant execution permissions to winnovative_loadhtml, run the following command in the application's output directory:
chmod +x winnovative_runtimes/linux-x64/native/winnovative_loadhtmlBefore running the PDF Processor components PDF to Text, PDF Text Search, PDF to Image and PDF Images Extraction on Linux, ensure that the winnovative_runtimes/linux-x64/native/winnovative_pdfprocessor file has execution permissions.
This file is automatically copied to your application's output directory after the NuGet package is installed and the project is built.
To grant execution permissions to winnovative_pdfprocessor, run the following command in the application's output directory:
chmod +x winnovative_runtimes/linux-x64/native/winnovative_pdfprocessorWith 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.
// create the converter object where you want to perform the 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 memory buffer to a PDF file
System.IO.File.WriteAllBytes("HtmlToMemory.pdf", htmlToPdfBuffer);With the code below, you can convert a URL to a PDF document in a memory buffer and then save the the data from the buffer to a file. The URL can also be a local file path prefixed with the "file://" URI scheme.
// 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 memory buffer to a PDF file
System.IO.File.WriteAllBytes("UrlToMemory.pdf", urlToPdfBuffer);With the code below, you can convert an HTML string to a PDF document in an ASP.NET Core application, store it in a memory buffer and then send it to the browser for download.
// create the converter object where you want to perform the conversion
HtmlToPdfConverter converter = new HtmlToPdfConverter();
// convert an HTML string to a memory buffer
byte[] htmlToPdfBuffer = converter.ConvertHtml("<b>Hello World</b> from Winnovative !", null);
FileResult fileResult = new FileContentResult(htmlToPdfBuffer, "application/pdf");
fileResult.FileDownloadName = "HtmlToPdf.pdf";
return fileResult;With the code below, you can convert a URL to a PDF document in an ASP.NET Core application, store it in a memory buffer and then send it to the browser for download. The URL can also be a local file path prefixed with the "file://" URI scheme.
// 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);
FileResult fileResult = new FileContentResult(urlToPdfBuffer, "application/pdf");
fileResult.FileDownloadName = "UrlToPdf.pdf";
return fileResult;At this point, everything should be configured and you can now run your application. Alternatively, you can follow the same instructions in this document to build and publish the ASP.NET demo application on Linux.