# Cloud Document AI v1beta3 API - Class OcrConfig (2.0.0-beta30)

2.0.0-beta30 (latest) 2.0.0-beta29 1.0.0-beta04

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

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

Config for Document OCR.

## Inheritance

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

## Implements

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

## 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.V1Beta3](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3)

## Assembly

Google.Cloud.DocumentAI.V1Beta3.dll

## Constructors

### OcrConfig()

    public OcrConfig()

### OcrConfig(OcrConfig)

    public OcrConfig(OcrConfig other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.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** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### 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.v1beta3.OcrConfig.PremiumFeatures.compute_style_info\]
instead.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### 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** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### 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** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### 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** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### EnableSymbol

    public bool EnableSymbol { get; set; }

Includes symbol level OCR information if set to true.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Hints

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

Hints for the OCR model.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.OcrConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.OcrConfig.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.OcrConfig.Types.Hints` |   |

### PremiumFeatures

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

Configurations for premium OCR features.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.OcrConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.OcrConfig.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DocumentAI.V1Beta3/latest/Google.Cloud.DocumentAI.V1Beta3.OcrConfig.Types.PremiumFeatures` |   |