Retrieving OCR Error Information

Top  Previous  Next

When calling DTWAIN_ExecuteOCR, a return value of 0 indicates an error.  An error in the OCR engine can also occur if DTWAIN_AcquireFile or DTWAIN_AcquireFileEx is called, and the file type to save the image is text or PDF.

 

To get the error that occurred, the DTWAIN_GetOCRLastError should be called.  This function returns an error code that is either one of the known DTWAIN error codes, or a custom error code that only the OCR engine will detect.