New to Telerik Document Processing? Start a free 30-day trial

PDF Export

Updated on Oct 28, 2026

The libraries included in Telerik Document Processing allow you to create, modify, and export PDF documents, and convert a document from a different file format to PDF.

Depending on the scenario, you can take advantage of the different features each library provides. This article describes the most common approaches for creating a PDF document and how to achieve the desired goal using Telerik Document Processing.

The .NET Standard specification does not define APIs for getting specific fonts. PdfFormatProvider needs to have access to the font data so that it can read it and add it to the PDF file. That is why, to allow the library to create and use fonts, you must provide an implementation of the FontsProviderBase abstract class and set this implementation to the FontsProvider property of FixedExtensibilityManager. For detailed information, check the cross-platform font and PDF support requirements.

Create a PDF Document From Scratch

Use RadPdfProcessing to create a PDF document from scratch.

Required packages

  • .NET Framework, .NET 8, .NET 9 and .NET 10 (or newer) for Windows

    • Telerik.Windows.Documents.Fixed
  • .NET Standard 2.0 (.NET 8, .NET 9 and .NET 10)

    • Telerik.Documents.Fixed

RadPdfProcessing is intended to work with fixed documents and provides a convenient API to create, modify, and export PDF documents.

You can import and export a document through the respective methods of the PdfFormatProvider class.

The PdfFormatProvider class of RadPdfProcessing resides in the Telerik.Windows.Documents.Fixed.FormatProviders.Pdf namespace. For more information on how to work with this provider, read the RadPdfProcessing PdfFormatProvider reference.

Convert a Document to PDF

In scenarios where you need to convert a document from another file format to PDF, you can take advantage of the capabilities of RadWordsProcessing. This library allows you to import documents from the most common rich text formats (DOCX, HTML, RTF) and plain text and export them to PDF. All the supported document formats and the corresponding format providers are listed in the RadWordsProcessing format providers and conversion options.

The PdfFormatProvider class of RadWordsProcessing resides in the Telerik.Windows.Documents.Flow.FormatProviders.Pdf namespace. For more information on how to work with this provider, read the RadWordsProcessing PdfFormatProvider reference.

Convert HTML to PDF

Use the following packages and example to convert HTML content to PDF.

Required packages:

  • .NET Framework, .NET 8, .NET 9 and .NET 10 (or newer) for Windows

    • Telerik.Windows.Documents.Flow.FormatProviders.Pdf
  • .NET Standard 2.0 (.NET 8, .NET 9 and .NET 10)

    • Telerik.Documents.Flow.FormatProviders.Pdf

Example 1 demonstrates how you can convert an HTML string to a PDF document. The HtmlFormatProvider and PdfFormatProvider classes of RadWordsProcessing are used to import/export the RadFlowDocument instance.

Example 1: Convert an HTML string to a PDF document

csharp

	string htmlContent = "<!DOCTYPE html><html><body><p>Hello, world!</p></body></html>";
	
    Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider htmlProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider();
	// Create a document instance from the content.
    RadFlowDocument document = htmlProvider.Import(htmlContent, TimeSpan.FromSeconds(10));

    Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider pdfProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();

	// Export the document. The different overloads enables you to export to a byte[] or to a Stream.
    byte[] pdfBytes = pdfProvider.Export(document, TimeSpan.FromSeconds(10));

Convert a Spreadsheet Document to PDF

Use RadSpreadProcessing to convert a spreadsheet document to PDF.

Required packages

  • .NET Framework, .NET 8, .NET 9 and .NET 10 (or newer) for Windows

    • Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf
  • .NET Standard 2.0 (.NET 8, .NET 9 and .NET 10)

    • Telerik.Documents.Spreadsheet.FormatProviders.Pdf

While the previously discussed libraries allow working with text documents, with RadSpreadProcessing you can create, import, and export tabular data. This library supports the most common file formats for storing spreadsheet documents - XLSX, CSV. All format providers are listed and described in the corresponding RadSpreadProcessing spreadsheet format providers.

The PdfFormatProvider class of RadSpreadProcessing resides in the Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf namespace. For more information on how to work with this provider, read the RadSpreadProcessing PdfFormatProvider reference.

See Also