L_Doc2FindDefaultFillMethod

#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.

Parameters

L_HDOC2 hDoc

Handle to the OCR document.

L_INT nPageIndex

Specify the page index. This is a zero-based index.

DOC2_FILLMETHOD * pFillMethod

Pointer to a DOC2_FILLMETHOD enumerated type to be updated with the default fill method.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

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

See Also

Functions

Topics

Example

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; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - OmniPage Engine C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.