L_DocImportZones

#include "ltdoc.h"

L_LTDOC_API L_INT L_DocImportZones(hDoc, nPageIndex, pszFileName)

L_HDOC hDoc;

/* handle to the OCR document */

L_INT nPageIndex;

/* page index */

L_TCHAR * pszFileName;

/* file name */

Imports the zone list from a zone file.

Parameter

Description

hDoc

Handle to the OCR document.

nPageIndex

Specifies the index of the page into which the settings will be loaded. This is a zero-based index.

pszFileName

Character string containing the name of the zone file that contains the zones to import.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Imports the zone list from a zone file into the specified page.

Calling this function removes any zone list already attached to the specified page.

To save the zone list to a file, call L_DocExportZones.

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_DocAddZone, L_DocGetZoneCount, L_DocGetZone, L_DocUpdateZone, L_DocRemoveZone, L_DocExportZones, L_DocFindZones, L_DocSetZoneOptions, L_DocGetZoneOptions

Topics:

OCR Functions: Zones

 

Working with Zones

Example

 L_INT DocImportZonesExample(L_HDOC hDoc,
                                            L_INT nPageIndex,
                                            L_TCHAR * pszZoneFile)
{
   L_INT nRet;
   nRet = L_DocImportZones(hDoc, nPageIndex, pszZoneFile);
   if (nRet == SUCCESS)
      MessageBox(NULL, TEXT("Imports the zone file into the specified page."), TEXT("Notice!"), MB_OK);
   else
      return nRet;

   //...
   // work with zones...
   //...

   // exports page zone list to Zone file...
   nRet = L_DocExportZones (hDoc, nPageIndex, pszZoneFile);
   if (nRet == SUCCESS)
      MessageBox(NULL, TEXT("Exports the zone list into a zone file."), TEXT("Notice!"), MB_OK);
   else
      return nRet;
   
   return SUCCESS;
}