Layer 1 Timeout
Uselayer_1_timeout to set a maximum processing time (in seconds) for the OCR engine per page. If the timeout is exceeded, an OCRTimeoutError is raised. This is useful for preventing long-running OCR operations on large or complex documents.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
layer_1_timeout | float | None | None | Timeout in seconds. None means no timeout |
Handling Timeout Errors
When the timeout is exceeded,OCRTimeoutError is raised with error code LAYER1_TIMEOUT. The timeout is applied per page — if page 3 of a 5-page PDF times out, only that page raises the error.

