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.dll
  • Telerik.Windows.Documents.Flow.dll
  • Telerik.Windows.Zip.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.Windows.Documents.Fixed.dll

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

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