OCROutputHandler OCRSetOutputHandler(OCROutputHandler handler)
When the output mode is OM_TEXT or OM_RICHTEXT, a user defined function of type OCROutputHandler will be called by the OCR engine for each “OCR event”.
Previously selected output handler.
New OCR Output handler function.
If the output mode is OT_TEXT, OCR events among OT_PROP, OT_ITAL, OT_UNDS, OT_SIZE, OT_HILT and OT_BITM are not sent to the output hander.
An OCROutputHandler has the following form:
void AnOCRHandler(int event, int param);
with event, the code of the “OCR event” and param a value associated with the event.
The OCR events are:
A character has been recognized. param contains the ASCII code of the recognized character.
The font type has changed (proportional or non proportional font). param is nonzero if the font is proportional.
Switches italic mode on or off. param is nonzero if the following characters are italic.
Switches underscored mode on or off. param is nonzero if the following characters are underscored.
Changes the character size. param contains the font size for the following characters.
Changes the character color.
If param contains 1, the following word is not in the dictionary. If param contains 2, the following word has not been well recognized.
An end of line has been reached.
An end of text area has been reached.
An image […]