LEADTOOLS Forms (Leadtools.Forms.Processing assembly)

LoadFields(String) Method

Show in webframe
Example 





The path of the file to load.
Loads field data from the specified file.
Syntax
public void LoadFields( 
   string fileName
)
'Declaration
 
Public Overloads Sub LoadFields( _
   ByVal fileName As String _
) 
'Usage
 
Dim instance As FormProcessingEngine
Dim fileName As String
 
instance.LoadFields(fileName)

            

            
public:
void LoadFields( 
   String^ fileName
) 

Parameters

fileName
The path of the file to load.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Barcode
Imports Leadtools.Codecs
Imports Leadtools.Forms
Imports Leadtools.Forms.Ocr
Imports Leadtools.Forms.Processing
Imports Leadtools.Forms.Recognition
Imports Leadtools.Forms.Recognition.Barcode
Imports Leadtools.Forms.Recognition.Ocr

''' This method loads the specified master form attributes object, fields, and image.
Public Function LoadMasterForm(ByVal recognitionEngine As FormRecognitionEngine, ByVal processingEngine As FormProcessingEngine, ByVal formsCodec As RasterCodecs, ByVal attributesFileName As String, ByVal fieldsFileName As String, ByVal imageFileName As String) As MasterForm
   Dim formData As Byte()
   Dim form As MasterForm = New MasterForm()
   formData = File.ReadAllBytes(attributesFileName)
   form.Attributes.SetData(formData)
   form.Properties = recognitionEngine.GetFormProperties(form.Attributes)
   processingEngine.LoadFields(fieldsFileName)
   form.ProcessingPages = processingEngine.Pages
   form.Image = formsCodec.Load(imageFileName, 1, CodecsLoadByteOrder.Bgr, 1, -1)
   Return form
End Function
using Leadtools;
using Leadtools.Barcode;
using Leadtools.Codecs;
using Leadtools.Forms;
using Leadtools.Forms.Ocr;
using Leadtools.Forms.Processing;
using Leadtools.Forms.Recognition;
using Leadtools.Forms.Recognition.Barcode;
using Leadtools.Forms.Recognition.Ocr;

/// This method loads the specified master form attributes, fields, and image.
public MasterForm LoadMasterForm(FormRecognitionEngine recognitionEngine, FormProcessingEngine processingEngine, RasterCodecs formsCodec, string attributesFileName, string fieldsFileName, string imageFileName)
{
   byte[] formData;
   MasterForm form = new MasterForm();
   formData = File.ReadAllBytes(attributesFileName);
   form.Attributes.SetData(formData);
   form.Properties = recognitionEngine.GetFormProperties(form.Attributes);
   processingEngine.LoadFields(fieldsFileName);
   form.ProcessingPages = processingEngine.Pages;
   form.Image = formsCodec.Load(imageFileName, 1, CodecsLoadByteOrder.Bgr, 1, -1);
   return form;
}
Requirements

Target Platforms

See Also

Reference

FormProcessingEngine Class
FormProcessingEngine Members
Overload List

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.

Leadtools.Forms requires a Forms Module license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features