Foxit PDF SDK

Public Member Functions | List of all members
FoxitPDFSDKPython2.OCRCallback Class Reference

Inherits FoxitPDFSDKPython2._object.

## Public Member Functions
def | IsImageIgnored (image_object)
| A callback function used to determine whether an image object should be excluded from OCR text recognition. More...
def | NeedToCancelNow (info)
| A callback function used to cancel current OCR progress. More...

## Detailed Description

This class represents a callback object to cancel OCR progress. All the pure virtual functions in this class are used as callback functions and should be implemented by user. An implemented OCRCallback object can be set by function FoxitPDFSDKPython2.OCREngine.SetOCRCallback .

## Member Function Documentation

## ◆ IsImageIgnored()

def FoxitPDFSDKPython2.OCRCallback.IsImageIgnored | ( |  | image_object | ) |

A callback function used to determine whether an image object should be excluded from OCR text recognition.

Parameters

  [in] | image_object | A pointer to an FoxitPDFSDKPython2.ImageObject object.

Returns
  true means to ignore the image object during OCR processing, the image will not be processed by the OCR engine for text extraction, but the image itself remains in the output document, while false means not.

## ◆ NeedToCancelNow()

def FoxitPDFSDKPython2.OCRCallback.NeedToCancelNow | ( |  | info | ) |

A callback function used to cancel current OCR progress.

This function cannot be used to cancel OCR conversion.

Parameters

  [in] | info | A string that describes the OCR progress information.

Returns
  true means to cancel progress, while false means not.