New to Telerik Document ProcessingStart a free 30-day trial

Contract for format providers that import/export documents via streams and expose capabilities and extensions.

Definition

Properties

Gets a value indicating whether this provider supports export.

C#
bool CanExport { get; }
Property Value:

The value indicating whether can export.

Gets a value indicating whether this provider supports import.

C#
bool CanImport { get; }
Property Value:

The value indicating whether can import.

Gets the file extensions supported by this provider.

C#
IEnumerable<string> SupportedExtensions { get; }
Property Value:

The supported extensions.

Methods

Exports the document to the output stream with an optional timeout.

C#
void Export(T document, Stream output, TimeSpan? timeout)
Parameters:documentT

The document.

outputStream

The output stream.

timeoutTimeSpan?

The timeout after which the operation will be cancelled.

Exceptions:

ArgumentOutOfRangeException

The exception that is thrown when timeout is less than -1 or greater than Int32.MaxValue. Note that this upper bound is more restrictive than TimeSpan.MaxValue.

Imports a document from the input stream with an optional timeout and returns the parsed document.

C#
T Import(Stream input, TimeSpan? timeout)
Parameters:inputStream

The input stream.

timeoutTimeSpan?

The timeout after which the operation will be cancelled.

Returns:

T

The imported document.

Exceptions:

ArgumentOutOfRangeException

The exception that is thrown when timeout is less than -1 or greater than Int32.MaxValue. Note that this upper bound is more restrictive than TimeSpan.MaxValue.