3.25.0 (latest) 3.24.0 3.23.0 3.22.0 3.21.0 3.20.0 3.19.0 3.18.0 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.0.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public sealed class OcrConfig : IMessage<OcrConfig>, IEquatable<OcrConfig>, IDeepCloneable<OcrConfig>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Document AI v1 API class OcrConfig.

Config for Document OCR.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> OcrConfig

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[OcrConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1/latest/Google.Cloud.DocumentAI.V1.OcrConfig.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OcrConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1/latest/Google.Cloud.DocumentAI.V1.OcrConfig.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[OcrConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1/latest/Google.Cloud.DocumentAI.V1.OcrConfig.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.DocumentAI.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1/latest/Google.Cloud.DocumentAI.V1.md.txt)

## Assembly

Google.Cloud.DocumentAI.V1.dll

## Constructors

### OcrConfig()

    public OcrConfig()

### OcrConfig(OcrConfig)

    public OcrConfig(OcrConfig other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `OcrConfig` |

## Properties

### AdvancedOcrOptions

    public RepeatedField<string> AdvancedOcrOptions { get; }

A list of advanced OCR options to further fine-tune OCR behavior. Current
valid values are:

- `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldstring` |   |

### ComputeStyleInfo

    [Obsolete]
    public bool ComputeStyleInfo { get; set; }

Turn on font identification model and return font style information.
Deprecated, use
\[PremiumFeatures.compute_style_info\]\[google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info\]
instead.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### DisableCharacterBoxesDetection

    public bool DisableCharacterBoxesDetection { get; set; }

Turn off character box detector in OCR engine. Character box detection is
enabled by default in OCR 2.0 (and later) processors.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### EnableImageQualityScores

    public bool EnableImageQualityScores { get; set; }

Enables intelligent document quality scores after OCR. Can help with
diagnosing why OCR responses are of poor quality for a given input.
Adds additional latency comparable to regular OCR to the process call.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### EnableNativePdfParsing

    public bool EnableNativePdfParsing { get; set; }

Enables special handling for PDFs with existing text information. Results
in better text extraction quality in such PDF inputs.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### EnableSymbol

    public bool EnableSymbol { get; set; }

Includes symbol level OCR information if set to true.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### Hints

    public OcrConfig.Types.Hints Hints { get; set; }

Hints for the OCR model.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OcrConfigTypesHints` |   |

### PremiumFeatures

    public OcrConfig.Types.PremiumFeatures PremiumFeatures { get; set; }

Configurations for premium OCR features.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OcrConfigTypesPremiumFeatures` |   |