Create Your First DOCX-to-PDF App with Telerik Document Processing
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 suite | Installation instructions | Default location of the Document Processing packages |
|---|---|---|
| UI for ASP.NET AJAX | Installing Telerik UI for ASP.NET AJAX |
|
| UI for ASP.NET MVC | Installing Telerik UI for ASP.NET MVC |
|
| UI for ASP.NET Core | Installing Telerik UI for ASP.NET Core | Install the libraries as NuGet packages. See Install using NuGet Packages for the current package source and feed configuration steps. |
| UI for Blazor | Installing Telerik UI for Blazor | Install the libraries as NuGet packages. See Install using NuGet Packages for the current package source and feed configuration steps. |
| UI for WPF | Installing Telerik UI for WPF |
|
| UI for Silverlight | Installing Telerik UI for Silverlight |
|
| UI for WinForms | Installing Telerik UI for WinForms |
|
| UI for WinUI | Installing Telerik UI for WinUI | C:\Program Files (x86)\Progress\Telerik UI for WinUI [version]\DPL |
| UI for .NET MAUI | Installing 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.

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.
-
Add the packages that provide the RadWordsProcessing document model and DOCX functionality.
For a .NET Framework project:
Telerik.Windows.Documents.CoreTelerik.Windows.Documents.Flow
For a .NET Standard or .NET 8, .NET 9 and .NET 10 project:
Telerik.Documents.CoreTelerik.Documents.Flow
-
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
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
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
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
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

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