New to Telerik Document ProcessingStart a free 30-day trial

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

Updated on Jul 21, 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 the NuGet package installation guide.

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 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.

Visual Studio create console project workflow for a Telerik Document Processing sample

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

Visual Studio create console project workflow for a Telerik Document Processing sample

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 the available NuGet packages reference.

Step 4: Create a RadFlowDocument

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

Create a RadFlowDocument and insert the initial text content

C#
Telerik.Documents.Flow.Model.RadFlowDocument document = new Telerik.Documents.Flow.Model.RadFlowDocument();
Telerik.Documents.Flow.Model.Editing.RadFlowDocumentEditor editor = new Telerik.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.

Import an existing DOCX file into a RadFlowDocument

C#
Telerik.Documents.Flow.Model.RadFlowDocument document = new Telerik.Documents.Flow.Model.RadFlowDocument();
Telerik.Documents.Flow.FormatProviders.Docx.DocxFormatProvider docxProvider = new Telerik.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 the DocxFormatProvider for DOCX export 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.

Export a RadFlowDocument to a DOCX file

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

Export the RadFlowDocument to PDF

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

Export a RadFlowDocument to a PDF file

C#
using (Stream output = File.OpenWrite("Output.pdf"))
{
    Telerik.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider flowPdfProvider = new Telerik.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.

Generated DOCX and PDF files in the Telerik Document Processing sample output folder

Generated DOCX and PDF files in the Telerik Document Processing sample output folder

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