Imports the zone list from a zone file.
            
            
            
            
Syntax
            Parameters
- pageIndex
 
- Specifies the index of the page into which the settings will be loaded. This is a zero-based index.
 - fileName
 
- String contains the name of the zone file that contains the zones to import.
 
            
             
            
            
            
            
            
Example
| Visual Basic |  Copy Code | 
|---|
Public Sub ImportZonesExample() 
    
   RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey") 
 
   Dim rasterDocument As RasterDocumentEngine 
   rasterDocument = RasterDocumentEngine.Instance 
   rasterDocument.Startup() 
    
 
   Try 
      rasterDocument.ImportZones(0, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\zone.zon") 
      MessageBox.Show("Imports the zone file into the specified page") 
   Catch ex As Exception 
      MessageBox.Show(ex.Message) 
   End Try 
 
    
    
    
    
   rasterDocument.ExportZones(0, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\zone.zon") 
   rasterDocument.Shutdown() 
End Sub | 
 
| C# |  Copy Code | 
|---|
public void ImportZonesExample()  {     // Note that this is a sample key, which will not work in your toolkit     RasterSupport.Unlock(Leadtools.RasterSupportType.Ocr, "TestKey");     RasterDocumentEngine rasterDocument;     rasterDocument = RasterDocumentEngine.Instance;     rasterDocument.Startup();       try     {        // assume page is added, refer to AddPage example for more information          rasterDocument.ImportZones(0, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\zone.zon");        MessageBox.Show("Imports the zone file into the specified page");          //...        // work with zones...         //...          // exports page zone list to Zone file...         rasterDocument.ExportZones(0, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\zone.zon");     }     catch (Exception ex)     {        MessageBox.Show(ex.Message);     }     rasterDocument.Shutdown();  } | 
 
 
            
            Remarks
            
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
 
            
            
See Also