---
title: "OcrSettings"
canonical_url: "https://www.nutrient.io/api/python/settings/advanced/vision/ocr-settings/"
md_url: "https://www.nutrient.io/api/python/settings/advanced/vision/ocr-settings.md"
last_updated: "2026-06-12T15:43:20.744Z"
description: "Settings for Ocr. Values fall back through three levels: document → SDK → built-in default."
---

Settings for Ocr. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document's settings, otherwise the SDK globally when set on SdkSettings.

**Tags:** `Advanced`, `Vision`

```python

from nutrient_sdk import OcrSettings

```

## Construction

`OcrSettings` is accessed through a [`Document`](/api/python/document/) instance for per-document overrides, or via [`SdkSettings`](/api/python/settings/document/sdk-settings/) for SDK-wide defaults.

```python

# Per-document override

with Document.open("input.pdf") as doc:
    settings = doc.settings.ocr_settings
    settings.some_field = new_value          # mutate fields directly

# SDK-wide default (applies to all documents)

SdkSettings.ocr_settings.some_field = new_value

```

Settings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — `doc.settings.ocr_settings = other_settings` is rejected.

## Properties

### default_languages

```python

@property
def default_languages(self) -> str

@default_languages.setter
def default_languages(self, value: str) -> None

```

Default OCR languages to use (comma-separated language codes).

**Type:** `str`

**Default:** `"eng"`

---

### enable_preprocessing

```python

@property
def enable_preprocessing(self) -> bool

@enable_preprocessing.setter
def enable_preprocessing(self, value: bool) -> None

```

Indicates whether to enable image preprocessing before OCR.

**Type:** `bool`

**Default:** `true`

---

### enable_skew_detection

```python

@property
def enable_skew_detection(self) -> bool

@enable_skew_detection.setter
def enable_skew_detection(self, value: bool) -> None

```

Indicates whether to enable automatic skew detection and correction.

**Type:** `bool`

**Default:** `true`

---

### enable_table_detection

```python

@property
def enable_table_detection(self) -> bool

@enable_table_detection.setter
def enable_table_detection(self, value: bool) -> None

```

Indicates whether to detect and extract tables from OCR output.

**Type:** `bool`

**Default:** `true`

---

### favor_accuracy

```python

@property
def favor_accuracy(self) -> bool

@favor_accuracy.setter
def favor_accuracy(self, value: bool) -> None

```

Indicates whether to favor accuracy over speed in OCR processing.

**Type:** `bool`

**Default:** `true`

---

---

## Related pages

- [Per-document override](/api/python/settings/advanced/vision/ai-processing-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/custom-vlm-api-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/form-labeling-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/finalizer-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/form-recognition-settings.md)
- [Vision](/api/python/settings/advanced/vision.md)
- [Per-document override](/api/python/settings/advanced/vision/inference-layout-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/open-ai-languages-detection-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/open-ai-picture-alt-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/reading-order-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/segmenter-settings.md)
- [Per-document override](/api/python/settings/advanced/vision/words-detection-settings.md)

