New to Telerik Document ProcessingStart a free 30-day trial

Create Your First DOCX-to-PDF App with Telerik Document Processing

Updated on Jun 9, 2026

This getting started guide shows how to create a simple application that uses Telerik Document Processing to generate a DOCX document and then export the same document to PDF.

The Telerik Document Processing libraries in this guide are UI-independent and work across .NET desktop, web, mobile, client-side, server-side, and cloud applications. The example uses RadWordsProcessing to create the document content and a PDF format provider to export it.

Step 1: Locate or Install Telerik Document Processing

Install Telerik.Licensing in the same project where you add the Telerik Document Processing packages.

Telerik Document Processing is available with several Telerik UI component bundles, so the libraries may already be present on your machine. If you already installed one of the supported Telerik UI suites, use the following table to find the installation instructions and the default package location for that suite.

For new development, the recommended installation path is NuGet. For current feed options and setup steps, see Install using NuGet Packages.

UI Components suiteInstallation instructionsDefault location of the Document Processing packages
UI for ASP.NET AJAXInstalling Telerik UI for ASP.NET AJAX
  • C:\Program Files (x86)\Progress\Telerik UI for ASP.NET AJAX [version]\AdditionalLibraries\Bin40
  • C:\Program Files (x86)\Progress\Telerik UI for ASP.NET AJAX [version]\AdditionalLibraries\Bin45
UI for ASP.NET MVCInstalling Telerik UI for ASP.NET MVC
  • C:\Program Files (x86)\Progress\Telerik UI for ASP.NET MVC [version]\dpl\net40
  • C:\Program Files (x86)\Progress\Telerik UI for ASP.NET MVC [version]\dpl\netstandard
UI for ASP.NET CoreInstalling Telerik UI for ASP.NET CoreInstall the libraries as NuGet packages. See Install using NuGet Packages for the current package source and feed configuration steps.
UI for BlazorInstalling Telerik UI for BlazorInstall the libraries as NuGet packages. See Install using NuGet Packages for the current package source and feed configuration steps.
UI for WPFInstalling Telerik UI for WPF
  • C:\Program Files (x86)\Progress\Telerik UI for WPF [version]\Binaries
  • C:\Program Files (x86)\Progress\Telerik UI for WPF [version]\Binaries.NoXaml
UI for SilverlightInstalling Telerik UI for Silverlight
  • C:\Program Files (x86)\Progress\Telerik UI for WPF [version]\Binaries\Silverlight
  • C:\Program Files (x86)\Progress\Telerik UI for WPF [version]\Binaries.NoXaml\Silverlight
UI for WinFormsInstalling Telerik UI for WinForms
  • C:\Program Files (x86)\Progress\Telerik UI for WinForms [version]\Bin40
  • C:\Program Files (x86)\Progress\Telerik UI for WinForms [version]\Bin50
  • C:\Program Files (x86)\Progress\Telerik UI for WinForms [version]\BinNetCore
UI for WinUIInstalling Telerik UI for WinUIC:\Program Files (x86)\Progress\Telerik UI for WinUI [version]\DPL
UI for .NET MAUIInstalling Telerik UI for .NET MAUI[installation_path]/Binaries/Shared

Step 2: Create a Console Application in Visual Studio

This guide uses a console application because Telerik Document Processing is UI-independent.

Open Microsoft Visual Studio and create a new console project. The sample can use a .NET Framework, .NET Standard, or .NET 8, .NET 9 and .NET 10 target framework.

Figure 1: Create a Console Project in Visual Studio

Use the Visual Studio path shown in the following image to create the console application.

Create Console Project

Step 3: Add the Required Telerik Document Processing Packages

This sample uses RadWordsProcessing to create the DOCX file. Add the required packages to the console project before you insert the sample code.

  1. Add the packages that provide the RadWordsProcessing document model and DOCX functionality.

    For a .NET Framework project:

    • Telerik.Windows.Documents.Core
    • Telerik.Windows.Documents.Flow

    For a .NET Standard or .NET 8, .NET 9 and .NET 10 project:

    • Telerik.Documents.Core
    • Telerik.Documents.Flow
  2. Add the package that exports the generated document to PDF.

    For a .NET Framework project:

    • Telerik.Windows.Documents.Flow.FormatProviders.Pdf

    For a .NET Standard or .NET 8, .NET 9 and .NET 10 project:

    • Telerik.Documents.Flow.FormatProviders.Pdf

You can find the complete Telerik Document Processing package list in Available NuGet Packages.

Step 4: Create a RadFlowDocument

Use the following snippet to create the RadFlowDocument instance that the sample exports later.

Example 1: Create a RadFlowDocument

C#
Telerik.Windows.Documents.Flow.Model.RadFlowDocument document = new Telerik.Windows.Documents.Flow.Model.RadFlowDocument();
Telerik.Windows.Documents.Flow.Model.Editing.RadFlowDocumentEditor editor = new Telerik.Windows.Documents.Flow.Model.Editing.RadFlowDocumentEditor(document);
editor.InsertText("Hello world!");

Step 5: Import an Existing DOCX File

Use this optional step if you want to start from an existing DOCX file instead of building the document content entirely in code.

Example 2: Import a DOCX File

C#
Telerik.Windows.Documents.Flow.Model.RadFlowDocument document = new Telerik.Windows.Documents.Flow.Model.RadFlowDocument();
Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider docxProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
using (Stream input = new FileStream("input.docx", FileMode.Open))
{
    document = docxProvider.Import(input, TimeSpan.FromSeconds(10));
}

Step 6: Export the Generated Document

Export the RadFlowDocument to DOCX

Use DocxFormatProvider to save the RadFlowDocument as a DOCX file. The following snippet creates the provider instance and exports the generated document to the bin folder of the current project.

Example 3: Export a RadFlowDocument to DOCX

C#
using (Stream output = new FileStream("output.docx", FileMode.OpenOrCreate))
{
    Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider docxProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
    docxProvider.Export(document, output, TimeSpan.FromSeconds(10));
}

Export the RadFlowDocument to PDF

Use PdfFormatProvider to export the same RadFlowDocument to a PDF file.

Example 4: Export a RadFlowDocument to PDF

C#
using (Stream output = File.OpenWrite("Output.pdf"))
{
    Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider flowPdfProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
    flowPdfProvider.Export(document, output, TimeSpan.FromSeconds(10));
}

Step 7: Run the Project and Verify the Output

Run the console application and verify that the bin folder contains the generated DOCX and PDF files.

Figure 2: Generated DOCX and PDF Files

Exported files

Next Steps

After you complete this first sample, continue with the following articles to explore editing, merging, inserting, and other document-processing tasks.

See Also