DTWAIN_GetOCRTextInfoHandle
The DTWAIN_GetOCRTextInfoHandle returns a handle to the text information after a selected OCR engine has processed an image file.
DTWAIN_OCRTEXTINFOHANDLE DTWAIN_GetOCRTextInfoHandle (
Parameters: Engine A selected OCR engine.
pageNumber Page number of the text information to return.
Returns: If successful, a non-zero value denoting a handle that must be used for calls to DTWAIN_GetOCRTextInfoLong and DTWAIN_GetOCRTextInfoFloat. If the call fails, 0 is returned. Call DTWAIN_GetLastError on further information on the failure.
Comments: DTWAIN_GetOCRTextInfoHandle returns a handle to a value that the application must use in subsequent calls to DTWAIN_GetOCRTextInfoFloat and DTWAIN_GetOCRTextInfoLong. This function is usually called after DTWAIN_ExecuteOCR has completed successfully.
The pageNumber is the page number that the handle will point to. The pageNumber argument starts from 0 to n-1 where n is the number of total text pages returned from DTWAIN_ExecuteOCR.
The DTWAIN_GetOCRTextInfoHandle is a LONG value that denotes the various other aspects of the OCR processing. These values are various text information such as the(x, y) location of each character processed, the width and height of each character, etc. To get this additional information, the DTWAIN_GetOCRTextInfoLong and DTWAIN_GetOCRTextInfoFloat is used, with the handle returned by DTWAIN_GetOCRTextInfoHandle passed as the first parameter.
Please note: The DTWAIN_GetOCRText function only retrieves the ASCII text that was processed by the OCR engine. It does not return other information such as each character's position and width. Only DTWAIN_GetOCRTextInfoHandle, DTWAIN_GetOCRTextInfoLong and DTWAIN_GetOCRTextInfoFloat can be used to get the other information concerning the text that was generated by the OCR engine.
Prerequisite Function Call(s) DTWAIN_SelectOCREngine, or DTWAIN_SelectOCREngineByName, or DTWAIN_SelectDefaultOCREngine |