Available for: UI for ASP.NET MVC | UI for ASP.NET AJAX | UI for Blazor | UI for WPF | UI for WinForms | UI for Xamarin | UI for WinUI | UI for ASP.NET Core | UI for .NET MAUI

New to Telerik Document Processing? Download free 30-day trial

Getting Started

This tutorial will take you through the creation of a sample application that uses RadWordsProcessing.

If you still don't have Telerik Document Processing installed, check the First Steps topic to learn how you can obtain the packages through the different suites.

Assembly References

The libraries support .NET 4 and later. .NET Standard-compatible binaries are available as well. The assemblies for .NET Standard don't include 'Windows' in their names. (e.g. Telerik.Documents.Core.dll). For more information check Cross-Platform Support article.

Here is a list of assemblies that contain the RadWordsProcessing functionality and need to be referenced in your project:

.NET Framework .NET Standard-compatible
Telerik.Windows.Documents.Core.dll Telerik.Documents.Core.dll
Telerik.Windows.Documents.Flow.dll Telerik.Documents.Flow.dll
Telerik.Windows.Documents.DrawingML.dll Telerik.Documents.DrawingML.dll
Telerik.Windows.Zip.dll Telerik.Zip.dll
If you need to import DOC or DOT files, you will need to refer the following assembly:
Telerik.Windows.Documents.Flow.FormatProviders.Doc.dll Telerik.Documents.Flow.FormatProviders.Doc.dll
If you need to export documents to PDF format, you will need to refer the following assemblies:
Telerik.Windows.Documents.Flow.FormatProviders.Pdf.dll Telerik.Documents.Flow.FormatProviders.Pdf.dll
Telerik.Windows.Documents.Fixed.dll Telerik.Documents.Fixed.dll
- Telerik.Documents.ImageUtils.dll*
This assembly is not available in UI for Xamarin.
To describe different colors, shapes and other properties, RadWordsProcessing depends on the listed below .NET assemblies, which you should also refer in your project:
WindowsBase.dll -
PresentationCore.dll -
PresentationFramework.dll -

* The Telerik.Documents.ImageUtils.dll assembly is needed when exporting to PDF format a document containing images different than Jpeg and Jpeg2000 or ImageQuality different than High.

The Telerik.Documents.ImageUtils.dll assembly depends on SkiaSharp. In order to use this assembly, you will need to add a reference to SkiaSharp. With the R2 2023 changes SkiaSharp replaced ImageSharp as the required dependency.

Creating RadFlowDocument from Code

Here is how to create a RadFlowDocument and insert some text content with the help of RadFlowDocumentEditor.

Example 1: Create RadFlowDocument programmatically

RadFlowDocument document = new RadFlowDocument(); 
RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document); 
editor.InsertText("Hello world!"); 

You need to add using directive to the following namespaces:

  • Telerik.Windows.Documents.Flow.Model
  • Telerik.Windows.Documents.Flow.Model.Editing

Exporting RadFlowDocument to Docx

Exporting the document to Docx file can be achieved with the DocxFormatProvider. Here is how to create a provider instance and save a document with it:

Example 2: Export RadFlowDocument to Docx

using (Stream output = new FileStream("output.docx", FileMode.OpenOrCreate)) 
    DocxFormatProvider provider = new DocxFormatProvider(); 
    provider.Export(document, output); 

More information about the supported formats and features can be found here.

See Also

In this article