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

Using TextFormatProvider

TextFormatProvider makes it easy to export RadFixedDocument to plain text format, preserving the document structure.

All you have to do in order to use TextFormatProvider is add references to the assemblies listed below:

  • Telerik.Windows.Documents.Core.dll
  • Telerik.Windows.Documents.Fixed.dll

Export

In order to export a document to plain text, you need to use the Export() method of TextFormatProvider.

Example 1 shows how to use TextFormatProvider to export RadFixedDocument to a string.

[C#] Example 1: Export RadFixedDocument to string

TextFormatProvider provider = new TextFormatProvider();
RadFixedDocument document = CreateRadFixedDocument();
string documentContent = provider.Export(document);

See Also