This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/python/settings/advanced/vision/ocr-settings.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. OcrSettings

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

from nutrient_sdk import OcrSettings

Construction

OcrSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.

# 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

@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

@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

@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

@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

@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