# OnnxOcrEngineOptions class

> Settings for OnnxOcrEngine. OnnxOcrEngineOptions class, PdfNetStack.Ocr namespace.

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

Settings for [OnnxOcrEngine](https://www.jadev-corp.com/api/pdfnetstack-ocr/onnxocrengine/).

```csharp
public sealed class OnnxOcrEngineOptions
```

**Inheritance**

[object](https://learn.microsoft.com/dotnet/api/system.object) ← 
[OnnxOcrEngineOptions](https://www.jadev-corp.com/api/pdfnetstack-ocr/onnxocrengineoptions/)

## Properties

### <a id="PdfNetStack_Ocr_OnnxOcrEngineOptions_BoxThreshold"></a> BoxThreshold

Mean text probability a detected box needs.

```csharp
public double BoxThreshold { get; init; }
```

#### Property Value

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

### <a id="PdfNetStack_Ocr_OnnxOcrEngineOptions_CorrectUpsideDownLines"></a> CorrectUpsideDownLines

Turn lines the orientation model reads as upside down. Needs its model file.

```csharp
public bool CorrectUpsideDownLines { get; init; }
```

#### Property Value

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="PdfNetStack_Ocr_OnnxOcrEngineOptions_Languages"></a> Languages

Scripts to load recognizers for: <code>latin</code>, <code>arabic</code>. Each needs its model file.

```csharp
public IReadOnlyList<string> Languages { get; init; }
```

#### Property Value

 [IReadOnlyList](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist\-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)\>

### <a id="PdfNetStack_Ocr_OnnxOcrEngineOptions_MaxDetectionSide"></a> MaxDetectionSide

Longest side the detector sees; larger images are scaled down for detection only.

```csharp
public int MaxDetectionSide { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="PdfNetStack_Ocr_OnnxOcrEngineOptions_ThreadsPerModel"></a> ThreadsPerModel

Threads each model may use; 0 lets ONNX Runtime decide.

```csharp
public int ThreadsPerModel { get; init; }
```

#### Property Value

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="PdfNetStack_Ocr_OnnxOcrEngineOptions_VerifyModels"></a> VerifyModels

Check each model file against its pinned SHA-256 before loading it.

```csharp
public bool VerifyModels { get; init; }
```

#### Property Value

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

## Used in

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

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