# IOcrEngine interface

> Recognizes text in images. Implementations must be safe to call from several threads.

Namespace: [PdfNetStack.Ocr](https://www.jadev-corp.com/api/pdfnetstack-ocr/)  
Assembly: PdfNetStack.Ocr.dll  
Package: `PdfNetStack.Ocr`

Recognizes text in images. Implementations must be safe to call from several threads.

```csharp
public interface IOcrEngine : IDisposable
```

**Implements**

[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

## Methods

### <a id="PdfNetStack_Ocr_IOcrEngine_Recognize_PdfNetStack_Ocr_OcrBitmap_PdfNetStack_Ocr_OcrRequest_System_Threading_CancellationToken_"></a> Recognize\(OcrBitmap, OcrRequest, CancellationToken\)

Recognizes one upright 8 bit gray image; boxes come back in its pixel coordinates.

```csharp
OcrImageResult Recognize(OcrBitmap image, OcrRequest request, CancellationToken cancellationToken)
```

#### Parameters

`image` [OcrBitmap](https://www.jadev-corp.com/api/pdfnetstack-ocr/ocrbitmap/)

The image, text upright.

`request` [OcrRequest](https://www.jadev-corp.com/api/pdfnetstack-ocr/ocrrequest/)

The script to read.

`cancellationToken` [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken)

Stops the work between lines.

#### Returns

 [OcrImageResult](https://www.jadev-corp.com/api/pdfnetstack-ocr/ocrimageresult/)

## Used in

- [Make scanned PDFs searchable with OCR in C#](https://www.jadev-corp.com/guides/ocr/)

Source: https://www.jadev-corp.com/pdfnetstack/api/pdfnetstack-ocr/iocrengine/
