New to Telerik Document ProcessingStart a free 30-day trial

Format provider that uses an OCR provider to create a RadFixedPage from an image.

Definition

Namespace:Telerik.Windows.Documents.Fixed.FormatProviders.Ocr

Assembly:Telerik.Windows.Documents.Fixed.FormatProviders.Ocr.dll

Syntax:

C#
public class OcrFormatProvider : BinaryFormatProviderBase<RadFixedPage>, IFormatProvider<RadFixedPage>, IBinaryFormatProvider<RadFixedPage>

Inheritance: objectFormatProviderBase<RadFixedPage>BinaryFormatProviderBase<RadFixedPage>OcrFormatProvider

Implements: IBinaryFormatProvider<RadFixedPage>IFormatProvider<RadFixedPage>

Inherited Members BinaryFormatProviderBase<RadFixedPage>.Import(byte[], TimeSpan?)BinaryFormatProviderBase<RadFixedPage>.Export(RadFixedPage, TimeSpan?)FormatProviderBase<RadFixedPage>.Import(Stream, TimeSpan?)FormatProviderBase<RadFixedPage>.Export(RadFixedPage, Stream, TimeSpan?)FormatProviderBase<RadFixedPage>.ExportOverride(RadFixedPage, Stream, CancellationToken)

Constructors

Initializes a new instance of the OcrFormatProvider class.

C#
public OcrFormatProvider(IOcrProvider ocrProvider)
Parameters:ocrProviderIOcrProvider

The OCR provider implementation that will be used for optical character recognition operations.

Properties

Gets a value indicating whether format provider can export.

C#
public override bool CanExport { get; }
Property Value:

The value indicating whether can export.

Overrides: FormatProviderBase<RadFixedPage>.CanExport

Gets a value indicating whether format provider can import.

C#
public override bool CanImport { get; }
Property Value:

The value indicating whether can import.

Overrides: FormatProviderBase<RadFixedPage>.CanImport

The OcrProvider instance used to process the image.

C#
public IOcrProvider OcrProvider { get; set; }

Gets the supported extensions.

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

The supported extensions.

Overrides: FormatProviderBase<RadFixedPage>.SupportedExtensions

Methods

Imports the specified input.

C#
protected override RadFixedPage ImportOverride(Stream input, CancellationToken cancellationToken)
Parameters:inputStream

The input stream containing the image data to process with OCR.

cancellationTokenCancellationToken

The cancellation token used to cancel the operation.

Returns:

RadFixedPage

The imported document.

Overrides: FormatProviderBase<RadFixedPage>.ImportOverride(Stream, CancellationToken)