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

Settings for ReadingOrder. 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 ReadingOrderSettings

Construction

ReadingOrderSettings 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.reading_order_settings
settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)
SdkSettings.reading_order_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.reading_order_settings = other_settings is rejected.

Properties

horizontal_dilation_threshold

@property
def horizontal_dilation_threshold(self) -> float
@horizontal_dilation_threshold.setter
def horizontal_dilation_threshold(self, value: float) -> None

Horizontal dilation threshold for column detection (normalized by page width). Default is 0.15 (15% of page width). Increase for wider column detection tolerance, decrease for stricter column boundaries.

Type: float

Default: 0.15f


text_direction

@property
def text_direction(self) -> TextDirection
@text_direction.setter
def text_direction(self, value: TextDirection) -> None

Text direction for reading order computation. Determines how elements are sorted and ordered on the page.

Type: TextDirection

Default: TextDirection.LeftToRightTopToBottom