#include "ltdoc2.h"
L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2FindDefaultFillMethod(hDoc, nPageIndex, pFillMethod)
Gets the default fill method of all zones in the specified page.
Handle to the OCR document.
Specify the page index. This is a zero-based index.
Pointer to a DOC2_FILLMETHOD enumerated type to be updated with the default fill method.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function tries to determine the type of content in the OCR zones of a page.
The function only looks into zones with the DOC2_FILL_DEFAULT value in their ZONEDATA2.FillMethod field. The detected fill method is updated in the pFillMethod variable. If you call this function with NULL for the pFillMethod parameter, the function performs a zone-by-zone analysis (instead of suggesting a general filling type for the entire image), and if the algorithm can determine a type for a given zone, the function replaces the DOC2_FILL_DEFAULT value in the zone's ZONEDATA2.FillMethod field by the determined one.
Required DLLs and Libraries
L_INT Doc2FindDefaultFillMethodExample(L_HDOC2 hDoc,L_INT nPageIndex)
{
L_INT nRet;
DOC2_FILLMETHOD fm;
nRet = L_Doc2FindDefaultFillMethod(hDoc, nPageIndex, &fm);
if (nRet != SUCCESS)
return nRet;
if (fm == DOC2_FILL_OMR)
MessageBox(NULL, TEXT("The Default Fill Method that is used in the specified page is Fill OMR."), TEXT("Notice!"), MB_OK);
return SUCCESS;
}