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

Settings for Deskew. 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: Vision, Advanced

from nutrient_sdk import DeskewSettings

Construction

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

Properties

enable_deskew

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

Indicates whether automatic deskewing is enabled.

Type: bool

Default: true


enable_orientation_correction

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

Indicates whether model-based cardinal orientation correction is enabled before fine deskewing. This is independent from VisionSettings.EnableOcr.

Type: bool

Default: true


force_orientation_correction

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

Forces cardinal orientation correction to run even on born-digital pages, which are otherwise skipped because a rendered text layer implies the page is already upright. Enable this when the source may still be rotated (for example a PDF with a rotated page box) and orientation correction must run regardless.

Type: bool

Default: false


inverse_deskew

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

Indicates whether the inverse deskew transform is enabled. When disabled, bounding boxes remain in deskewed-image coordinates.

Type: bool

Default: true


orientation_correction_confidence_threshold

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

Minimum model confidence required before applying cardinal orientation correction. Predictions below this threshold are recorded but not applied.

Type: float

Default: 0.3f


skew_binarization_method

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

Binarization method for skew detection. Supported values: “default” (internal Modified Otsu), “sauvola” (better for poor contrast), “otsu” (explicit Modified Otsu).

Type: str

Default: "default"


skew_tolerance

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

Maximum skew angle tolerance in degrees.

Type: float

Default: 15.0f