Class
DocumentFormatProviderBase

A base class defining members for importing and exporting content to/from RadDocument.

Definition

Namespace:Telerik.Windows.Documents.FormatProviders

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public abstract class DocumentFormatProviderBase : IDocumentFormatProvider

Inheritance: objectDocumentFormatProviderBase

Derived Classes: HtmlFormatProviderDocxFormatProviderPdfFormatProviderRtfFormatProviderTxtFormatProviderXamlFormatProvider

Implements: IDocumentFormatProvider

Constructors

DocumentFormatProviderBase()

Declaration

cs-api-definition
protected DocumentFormatProviderBase()

Properties

CanExport

Gets a value indicating whether this instance can export.

Declaration

cs-api-definition
public abstract bool CanExport { get; }

Property Value

bool

true if this instance can export; otherwise, false.

Implements IDocumentFormatProvider.CanExport

CanImport

Gets a value indicating whether this instance can import.

Declaration

cs-api-definition
public abstract bool CanImport { get; }

Property Value

bool

true if this instance can import; otherwise, false.

Implements IDocumentFormatProvider.CanImport

FilesDescription

Gets the description of the supported file formats.

Declaration

cs-api-definition
public virtual string FilesDescription { get; }

Property Value

string

The files description.

Implements IDocumentFormatProvider.FilesDescription

Name

Gets the name of the specific format provider.

Declaration

cs-api-definition
public abstract string Name { get; }

Property Value

string

The name.

Implements IDocumentFormatProvider.Name

SupportedExtensions

Gets the extensions supported by this format provider.

Declaration

cs-api-definition
public abstract IEnumerable<string> SupportedExtensions { get; }

Property Value

IEnumerable<string>

The supported extensions.

Implements IDocumentFormatProvider.SupportedExtensions

Methods

Export(RadDocument)

Exports the specified document to a byte array.

Declaration

cs-api-definition
public virtual byte[] Export(RadDocument document)

Parameters

document

RadDocument

The document.

Returns

byte[]

A byte array containing the document data.

Implements IDocumentFormatProvider.Export(RadDocument)

Export(RadDocument, Stream)

Exports the specified RadDocument instance.

Declaration

cs-api-definition
public abstract void Export(RadDocument document, Stream output)

Parameters

document

RadDocument

The document.

output

Stream

The Stream the document should be saved into.

Implements IDocumentFormatProvider.Export(RadDocument, Stream)

Import(Stream)

Imports the specified Stream into a RadDocument instance.

Declaration

cs-api-definition
public abstract RadDocument Import(Stream input)

Parameters

input

Stream

The Stream containing the document data.

Returns

RadDocument

The generated RadDocument instance.

Implements IDocumentFormatProvider.Import(Stream)

Import(byte[])

Imports the specified byte array into a RadDocument instance.

Declaration

cs-api-definition
public virtual RadDocument Import(byte[] input)

Parameters

input

byte[]

The byte array containing the document data.

Returns

RadDocument

The generated RadDocument instance.

Implements IDocumentFormatProvider.Import(byte[])