|L_OcrPage page;||handle to the OCR page|
|const L_TCHAR* fileName;||the name of the file to save the zones to|
|L_UINT pageNumber;||1-based page number of the zones in the file to replace or append|
|const L_OcrWriteXmlOptions* xmlOptions;||Options to use when creating the XML data.|
Saves the zones of this L_OcrPage to a multi-page zones disk file with XML options.
|page||Handle to the OCR page.|
|fileName||The name of the file to save the zones to.|
|pageNumber||The 1-based page number of the zones in the file to replace (or append). If the zones file contain zones for page 'pageNumber', then this method will replace these zones with the zones of the current L_OcrPage. If the file does not contain zones for page 'pageNumber', then this method will append these zones at the end of the file.|
|xmlOptions||Options to use when creating the XML data.|
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
L_OcrPage_SaveZonesFile method save the zones of a particular OCR page to a multi-page disk file. If the file exist previously, this method will replace the zones specified in 'pageNumber' with the zones of the L_OcrPage. If the file does not contain zones for the specified page number, the zones will be appended to the file at the end and can be loaded later using L_OcrPage_LoadZonesFile.
If you wish to save all L_OcrDocument pages zones to file then you have to loop through the OCR document pages saving each page zones to the same file and the save method will append the zones of each page to the file giving you a multi-page zones file. The saved data will contain the page number of the zones. To load these zones, you also have to loop through all you OCR document pages loading each page zones separately passing the L_OcrPage_LoadZonesFile method the page number you wish to load its zones.
Note on loading zones from a multi-page zone file: If the file does not contain zones data with the correct page number, the engine will not load any zones for this page. After the method returns, any OCR page that did not have zones data will contain zero zones. You can then use L_OcrPage_AutoZone if required to re-zone this page.
The zones of this page will first be cleared prior to loading the new items.
Saving zones to an external file or could be useful when you are processing forms. For example, you can load one of the forms and automatically find the zones inside it using L_OcrPage_AutoZone, if the automatic zone detection was not 100 percent satisfactory, you can update the page zones manually and then save the result with L_OcrPage_SaveZonesFile. Once the zones are saved, you can now process all similar forms in the following manner:
Required DLLs and Libraries
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.
|Functions:||L_OcrPage_Destroy, L_OcrPage_FromBitmap, L_OcrPage_GetBitmap, L_OcrPage_SetBitmap, L_OcrPage_GetOverlayBitmap, L_OcrPage_SetOverlayBitmap, L_OcrPage_SetBitmapChangedCallback, L_OcrPage_IsInverted, L_OcrPage_GetRotateAngle, L_OcrPage_GetDeskewAngle, L_OcrPage_AutoPreprocess, L_OcrPage_AutoZone, L_OcrPage_GetZoneCount, L_OcrPage_InsertZone, L_OcrPage_AddZone, L_OcrPage_IndexOfZone, L_OcrPage_GetZoneAt, L_OcrPage_SetZoneAt, L_OcrPage_RemoveZone, L_OcrPage_RemoveZoneAt, L_OcrPage_ClearZones, L_OcrPage_GetZoneCells, L_OcrPage_SetZoneCells, L_OcrPage_HitTestZone, L_OcrPage_IsRecognized, L_OcrPage_Recognize, L_OcrPage_Unrecognize, L_OcrPage_GetRecognizeStatistics, L_OcrPage_GetRecognizedCharacters, L_OcrPage_SetRecognizedCharacters, L_OcrPage_FreePageCharacters, L_OcrPage_GetZoneWords, L_OcrPage_FreeWords, L_OcrPage_GetText, L_OcrPage_ExtractZoneMICRData, L_OcrPage_DetectLanguages, L_OcrPage_LoadZonesFile, L_OcrPage_SaveXml, L_OcrPage_GetAutoPreprocessValues|
|Topics:||Programming with LEADTOOLS OCR Module - LEAD Engine|
|Starting and Shutting Down the OCR Engine|
|Recognizing OCR Pages|
|Working With OCR Pages|
For an Example, refer to L_OcrPage_AutoZone