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 OcrSettingsConstruction
OcrSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.
# Per-document overridewith 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_valueSettings 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
@propertydef default_languages(self) -> str
@default_languages.setterdef default_languages(self, value: str) -> NoneDefault OCR languages to use (comma-separated language codes).
Type: str
Default: "eng"
enable_preprocessing
@propertydef enable_preprocessing(self) -> bool
@enable_preprocessing.setterdef enable_preprocessing(self, value: bool) -> NoneIndicates whether to enable image preprocessing before OCR.
Type: bool
Default: true
enable_skew_detection
@propertydef enable_skew_detection(self) -> bool
@enable_skew_detection.setterdef enable_skew_detection(self, value: bool) -> NoneIndicates whether to enable automatic skew detection and correction.
Type: bool
Default: true
enable_table_detection
@propertydef enable_table_detection(self) -> bool
@enable_table_detection.setterdef enable_table_detection(self, value: bool) -> NoneIndicates whether to detect and extract tables from OCR output.
Type: bool
Default: true
favor_accuracy
@propertydef favor_accuracy(self) -> bool
@favor_accuracy.setterdef favor_accuracy(self, value: bool) -> NoneIndicates whether to favor accuracy over speed in OCR processing.
Type: bool
Default: true