Leadtools.Forms.Processing Namespace > FormProcessingEngine Class > LoadFields Method : LoadFields(String) Method |
'Usage Dim instance As FormProcessingEngine Dim fileName As String instance.LoadFields(fileName)
function Leadtools.Forms.Processing.FormProcessingEngine.LoadFields(String)( fileName )
''' 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
/// 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; }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2