L_DocFindDefaultFillMethod

#include "ltdoc.h"

L_LTDOC_API L_INT L_DocFindDefaultFillMethod(hDoc, nPageIndex, pFillMethod)

L_HDOC hDoc;

/* handle to the OCR document */

L_INT nPageIndex;

/* page index */

FILLMETHOD * pFillMethod;

/* pointer to default fill method  */

Gets the default fill method for the specified page.

Parameter

Description

hDoc

Handle to the OCR document.

nPageIndex

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

pFillMethod

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

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Gets the global fill method of all zones in the specified page.

The function only looks into zones with the FILL_DEFAULT value in their ZONEDATA.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 FILL_DEFAULT value in the zone's ZONEDATA.FillMethod field by the determined one.

Required DLLs and Libraries

LTDOC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_DocGetFillMethod, L_DocSetFillMethod, L_DocCleanupPages

Topics:

OCR Functions: Pages

 

Working with Pages

Example

 L_INT DocFindDefaultFillMethodExample(L_HDOC hDoc,L_INT nPageIndex)
{
   L_INT nRet;
   FILLMETHOD fm;
  nRet = L_DocFindDefaultFillMethod(hDoc, nPageIndex, &fm);
   if (nRet != SUCCESS)
      return nRet;

   if (fm == 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;
}