New to Telerik UI for WPFStart a free 30-day trial

Represents a contract for a document format provider that can handle different types of document formats.

Definition

Namespace:Telerik.Windows.Documents.FormatProviders

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public interface IDocumentFormatProvider

Derived Classes: DocumentFormatProviderBaseHtmlFormatProviderDocxFormatProviderPdfFormatProviderRtfFormatProviderTxtFormatProviderXamlFormatProvider...

Properties

Determines whether the document format provider can export a document to a specific format.

C#
bool CanExport { get; }

Determines whether the document format provider can import a specified format.

C#
bool CanImport { get; }

Represents the description of files supported by the document format provider in the Telerik Windows Documents library.

C#
string FilesDescription { get; }

Gets the name of the document format provider.

C#
string Name { get; }
Property Value:

A string that represents the name of the document format provider.

Gets the supported file extensions for the document format provider.

C#
IEnumerable<string> SupportedExtensions { get; }

Methods

Exports the specified RadDocument to a given stream using the document format provider.

C#
void Export(RadDocument document, Stream output)
Parameters:documentRadDocument

The RadDocument to be exported.

outputStream

The stream to which the document will be exported.

Exports the specified RadDocument to a desired format using the document format provider.

C#
byte[] Export(RadDocument document)
Parameters:documentRadDocument

The RadDocument to be exported.

Returns:

byte[]

A boolean value indicating whether the export operation was successful.

Imports a document from a byte array using the specified format provider.

C#
RadDocument Import(byte[] input)
Parameters:inputbyte[]

A byte array containing the document data to be imported.

Returns:

RadDocument

An object of type RadDocument representing the imported document.

Imports a document from the specified stream using the document format provider.

C#
RadDocument Import(Stream input)
Parameters:inputStream

The stream from which the document will be imported.

Returns:

RadDocument

A value of type T representing the imported document.