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

Settings for PPTextDet. 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 PPTextDetSettings

Construction

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

Properties

box_threshold

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

Threshold for box confidence

Type: float

Default: 0.6f


limit_side_length

@property
def limit_side_length(self) -> int
@limit_side_length.setter
def limit_side_length(self, value: int) -> None

Limit value for resizing, PaddleOCR runtime uses limit_side_len=64, limit_type=‘min’ for better quality

Type: int

Default: 64


limit_type

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

‘max’ to limit longest side, ‘min’ to limit shortest side

Type: str

Default: "min"


max_candidates

@property
def max_candidates(self) -> int
@max_candidates.setter
def max_candidates(self, value: int) -> None

Maximum number of text boxes to detect

Type: int

Default: 1000


model_path

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

Path to the ONNX model file (model.onnx).

Type: str

Default: GetDefaultModelPath()


threshold

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

Binarization threshold for probability map

Type: float

Default: 0.3f


unclip_ratio

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

Ratio for polygon expansion (Official PaddleOCR uses 1.5)

Type: float

Default: 1.5f


use_cpu_only

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

Enable CPU mode for ONNX Runtime. When true, forces CPU execution. When false, uses default providers.

Type: bool

Default: false