L_OcrAutoRecognizeJobOperationCallbackData

struct L_OcrAutoRecognizeJobOperationCallbackData 
{ 
   L_UINT StructSize; 
   L_INT Status; 
   L_OcrAutoRecognizeJob Job; 
   L_BOOL IsPostOperation; 
   L_OcrAutoRecognizeManagerJobOperation Operation; 
   BITMAPHANDLE* PageBitmap; 
   L_OcrDocument Document; 
   L_OcrPage Page; 
   L_UINT ImagePageNumber; 
   DOCWRTFORMAT Format; 
}; 
typedef struct L_OcrAutoRecognizeJobOperationCallbackData L_OcrAutoRecognizeJobOperationCallbackData; 

Contains data for the L_OcrAutoRecognizeJobOperationCallback callback that occurs when L_OcrAutoRecognizeManager_Run, L_OcrAutoRecognizeManager_RunJob or L_OcrAutoRecognizeManager_RunJobAsync is called.

Members

StructSize

Structure size. It should be equal to sizeof(L_OcrAutoRecognizeJobOperationCallbackData).

Status

The status of the current job operation. if the current operation is successful then this member will contains the value SUCCESS, other error codes otherwise.

Job

The instance of the L_OcrAutoRecognizeJob currently being run. You can use this member to get information about the job, for example, the image file name and page numbers to recognize and the output document file name and format through L_OcrAutoRecognizeJob.JobData. Note that L_OcrAutoRecognizeJobData.LastPageNumber will have the true value of the last page number in the image file if a value of -1 (for up to last page) was passed in the original object used to create L_OcrAutoRecognizeJob.

IsPostOperation

A L_BOOL value that indicates whether the engine is preparing to run the operation (the value of IsPostOperation is L_FALSE) or whether the operation has already run (the value of IsPostOperation is L_TRUE). This is useful if you want to manipulate operation data.

Operation

An L_OcrAutoRecognizeManagerJobOperation enumeration member that specifies the current operation.

PageBitmap

The BITMAPHANDLE object used for the current operation. This member is only valid when the current operation is:

L_OcrAutoRecognizeManagerJobOperation_LoadPage

When the value of IsPostOperation is L_FALSE, then PageBitmap holds the bitmap handle to be used to create the L_OcrPage. By default this will be NULL and the engine will load the bitmap from the input document. You can override this behavior by setting your own BITMAPHANDLE in this property. The engine will use the supplied bitmap to create the page.

L_OcrAutoRecognizeManagerJobOperation_SavePage

PageBitmap holds the bitmap handle to be used with the final document if the page contains graphics zone (to obtain the graphics area) or if the format supports "image over text" such as PDF with Image/Text. By default this is either the original bitmap of the page (same bitmap handle obtained through L_OcrPage_GetBitmap with L_OcrPageBitmapType_Original or the overlay image if the user set a value using L_OcrPage_SetOverlayBitmap. You can set your own bitmap to be used for this purpose by setting the value in PageBitmap during this operation when IsPostOperation is L_FALSE. Note that the engine will not release this bitmap handle, therefore, it is recommended that the user calls L_FreeBitmap on PageBitmap in the next callback occurrence (when IsPostOperation is L_TRUE).

Document

An L_OcrDocument handle that specifies the OCR document being used in the current operation. This handle is not valid and will be NULL when the current operation is L_OcrAutoRecognizeManagerJobOperation_ConvertDocument (or in L_OcrAutoRecognizeManagerJobOperation_CreateDocument with IsPostOperation equals to L_FALSE).

Page

An L_OcrPage handle that specifies the OCR page being used in the current operation. This handle is not valid and will be NULL when the current operation is L_OcrAutoRecognizeManagerJobOperation_CreateDocument or L_OcrAutoRecognizeManagerJobOperation_ConvertDocument.

ImagePageNumber

The page number in the input (bitmap) file name for the current operation. This member is not valid and will be 0 when the current operation is L_OcrAutoRecognizeManagerJobOperation_CreateDocument or L_OcrAutoRecognizeManagerJobOperation_ConvertDocument.

Format

An DOCWRTFORMAT enumeration member that specifies the format being used in the current operation. This member will be equal to the original L_OcrAutoRecognizeJobData.Format value except for the following operations: L_OcrAutoRecognizeManagerJobOperation_SavePage and L_OcrAutoRecognizeManagerJobOperation_Append where it will be DOCUMENTFORMAT_LTD.

Comments

L_OcrAutoRecognizeJobOperationCallback will trigger when L_OcrAutoRecognizeManager_Run, L_OcrAutoRecognizeManager_RunJob or L_OcrAutoRecognizeManager_RunJobAsync is called. You can use this callback to get information on the current operation (creating an OCR document, loading a page, zoning, recognizing, saving, etc.).

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - LEAD Engine C API Help