Skip to main content

Layer 1 Timeout

Use layer_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

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.

Async Usage