LEADTOOLS Forms (Leadtools.Forms.Processing assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
LoadFields(String) Method
See Also 
Leadtools.Forms.Processing Namespace > FormProcessingEngine Class > LoadFields Method : LoadFields(String) Method



fileName
The path of the file to load.

The LoadFields(String) Method is available as an add-on to the LEADTOOLS Document and Medical Imaging toolkits.

fileName
The path of the file to load.
Loads field data from the specified file.

Syntax

Visual Basic (Declaration) 
Overloads Public Sub LoadFields( _
   ByVal fileName As String _
) 
Visual Basic (Usage)Copy Code
Dim instance As FormProcessingEngine
Dim fileName As String
 
instance.LoadFields(fileName)
C# 
public void LoadFields( 
   string fileName
)
C++/CLI 
public:
void LoadFields( 
   String^ fileName
) 

Parameters

fileName
The path of the file to load.

Example

For a complete example on using the forms recognition and processing, refer to the FormProcessingEngine example.

This example loads form fields from a file.

Visual BasicCopy Code
''' 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
C#Copy Code
/// 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: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

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