L_LTDOC2_API L_INT L_Doc2GetRecognizedCharactersColorsExt(hDoc, nDocId, nPageIndex, pClrs, pnClrsCount)
Gets the recognized characters colors.
Handle to the OCR document. This handle is obtained by calling the L_Doc2StartUp function.
Document ID created by calling L_Doc2CreateDocument.
Zero-based index of the page.
Address of an array of COLORREF to be updated.
Address of a variable to be updated with the number of elements in the array.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
Getting the foreground and background colors for the recognized characters is a multi-step process.
Now call L_Doc2GetRecognizedCharactersColorsExt, passing NULL to _pClrs_, in order to get the elements count of the colors array.
Allocate the array of COLORREF.
Call L_Doc2GetRecognizedCharactersColorsExt again, this time passing the address of the allocated array to the pClrs parameter to get the colors.
Required DLLs and Libraries