skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Interface IFormatProvider<T>

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

Namespace: Telerik.Windows.Documents.Common.FormatProviders
Assembly: Telerik.Windows.Documents.Core.dll

Syntax

public interface IFormatProvider<T>
Type Parameters
T

Properties

CanExport

Gets a value indicating whether this provider supports export.

Declaration
bool CanExport { get; }
Property Value
System.Boolean

The value indicating whether can export.

CanImport

Gets a value indicating whether this provider supports import.

Declaration
bool CanImport { get; }
Property Value
System.Boolean

The value indicating whether can import.

SupportedExtensions

Gets the file extensions supported by this provider.

Declaration
IEnumerable<string> SupportedExtensions { get; }
Property Value
System.Collections.Generic.IEnumerable<System.String>

The supported extensions.

Methods

Export(T, Stream)

Exports the document to the output stream.

Declaration
[Obsolete("This method is obsolete. Please use Export(T document, Stream output, TimeSpan? timeout) instead.")]
void Export(T document, Stream output)
Parameters
T document

The document.

System.IO.Stream output

The output stream.

Export(T, Stream, Nullable<TimeSpan>)

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

Declaration
void Export(T document, Stream output, TimeSpan? timeout)
Parameters
T document

The document.

System.IO.Stream output

The output stream.

System.Nullable<System.TimeSpan> timeout

The timeout after which the operation will be cancelled.

Exceptions
System.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.

Import(Stream)

Imports a document from the input stream and returns the parsed document.

Declaration
[Obsolete("This method is obsolete. Please use Import(Stream input, TimeSpan? timeout) instead.")]
T Import(Stream input)
Parameters
System.IO.Stream input

The input stream.

Returns
T

The imported document.

Import(Stream, Nullable<TimeSpan>)

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

Declaration
T Import(Stream input, TimeSpan? timeout)
Parameters
System.IO.Stream input

The input stream.

System.Nullable<System.TimeSpan> timeout

The timeout after which the operation will be cancelled.

Returns
T

The imported document.

Exceptions
System.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.

Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.