←Select platform

FillFieldsInformation Method

Summary
Update passed Leadtools.Forms.Processing.FormPages by filling Extra-information after recognition phase but before Processing phase.

Syntax
C#
C++/CLI
Java
Python
public: 
void FillFieldsInformation(  
   RasterImage^ form, 
   FormRecognitionAttributes^ masterAttributes, 
   FormRecognitionAttributes^ formAttributes, 
   FormPages^ pages, 
   List<PageAlignment^>^ alignments 
)  
def FillFieldsInformation(self,form,masterAttributes,formAttributes,pages,alignments): 

Parameters

form
Form image.

masterAttributes
The Master Form attribute object.

formAttributes
The Form attribute object.

pages
The Leadtools.Forms.Processing.FormPages that needs to by updated with Recognition Information.

alignments
List of Alignments for Each page in Leadtools.Forms.Processing.FormPages.

Remarks

User should call this function to update Leadtools.Forms.Processing.FormPages to get better results and fix a lot of recognition problems that may occur.

Example
C#
using Leadtools; 
using Leadtools.Barcode; 
using Leadtools.Codecs; 
using Leadtools.Forms.Common; 
using Leadtools.Ocr; 
using Leadtools.Forms.Processing; 
using Leadtools.Forms.Recognition; 
using Leadtools.Forms.Recognition.Barcode; 
using Leadtools.Forms.Recognition.Ocr; 
 
///This method will compare form Master Form and if they matched then update Form FormPages. 
public void FillFieldsInformation(RasterImage form, FormPages pages, FormRecognitionAttributes formAttributes, FormRecognitionAttributes masterAttributes, FormRecognitionEngine engine) 
{ 
   FormRecognitionResult result = engine.CompareForm(masterAttributes, formAttributes, null); 
   //check if we have good results then update pages to used in Process stage 
   if (result != null && result.Reason == FormRecognitionReason.Success && result.Confidence > 50) 
   { 
      //save all pages alignment in List and pass them to FillFieldsInformation 
      List<PageAlignment> alignments = new List<PageAlignment>(); 
      for (int i = 0; i < result.PageResults.Count; i++) 
         alignments.Add(result.PageResults[i].Alignment); 
 
      //the pages will be updated 
      engine.FillFieldsInformation(form, masterAttributes, formAttributes, pages, alignments); 
   } 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Forms.Recognition Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.