Edit this page
Available for: UI for ASP.NET AJAX | UI for ASP.NET MVC | UI for WPF | UI for WinForms

Getting Started

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

Assembly References

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

  • Telerik.Windows.Documents.Core
  • Telerik.Windows.Documents.Flow
  • Telerik.Windows.Zip
  • Telerik.Windows.Documents.Flow.FormatProviders.Pdf
  • Telerik.Windows.Documents.Fixed

The latter two assemblies - Telerik.Windows.Documents.Flow.FormatProviders.Pdf.dll and Telerik.Windows.Documents.Fixed.dll are only needed if you plan on exporting the document to PDF format.

Creating RadFlowDocument from Code

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

[C#] 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:

[C#] 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