L_Doc2FindDefaultFillMethodExt

#include "ltdoc2.h"

L_LTDOC2_API L_INT L_Doc2FindDefaultFillMethodExt(hDoc, nDocId, nPageIndex, pFillMethod)

Gets the default fill method for all zones in the specified page.

Parameters

L_HDOC2 hDoc

Handle to the OCR document.

L_INT nDocId

Document ID created by calling L_Doc2CreateDocument.

L_INT nPageIndex

Zero-based page 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

L_Doc2FindDefaultFillMethodExt tries to determine the type of content in the OCR zones of a page.

It 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. Call this function with NULL for the pFillMethod parameter to perform a zone-by-zone analysis (instead of suggesting a general filling type for the entire image). 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 Doc2FindDefaultFillMethodExampleExt(L_HDOC2 hDoc, L_INT nDocId, L_INT nPageIndex) 
{ 
   L_INT nRet; 
   DOC2_FILLMETHOD fm; 
   nRet = L_Doc2FindDefaultFillMethodExt(hDoc, nDocId, 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 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - OmniPage Engine C API Help