pdftools_sdk.ocr.image_options

Classes

ImageOptions()

Options for OCR processing of images

class pdftools_sdk.ocr.image_options.ImageOptions[source]

Bases: _NativeObject

Options for OCR processing of images

These options control how images in the PDF document are processed during OCR.

__init__()[source]
property mode: ImageProcessingMode

The mode for processing images

Default value: pdftools_sdk.ocr.image_processing_mode.ImageProcessingMode.NONE

Returns:

pdftools_sdk.ocr.image_processing_mode.ImageProcessingMode

property rotate_scan: bool

Whether to rotate scanned pages based on detected orientation

This option has an effect only if the required information is provided by the OCR engine, which depends on the type and settings of the engine.

Default value: False

Returns:

bool

property deskew_scan: bool

Whether to deskew scanned pages

This option has an effect only if the required information is provided by the OCR engine, which depends on the type and settings of the engine.

Default value: False

Returns:

bool

property remove_only_invisible_ocr_text: bool

Whether to remove only invisible OCR text (text rendering mode 3)

When used with pdftools_sdk.ocr.image_processing_mode.ImageProcessingMode.REPLACETEXT or pdftools_sdk.ocr.image_processing_mode.ImageProcessingMode.REMOVETEXT , only the invisible text layer typically added by OCR engines is removed, while other text is preserved.

Default value: False

Returns:

bool