Creates a new SingleSelectionField with automatically filled out field values recognized by Ocr.
public SingleSelectionField CreateSingleSelectionField(
List<FormField> formFields,
LeadRect bounds,
int formPageNumber
)
formFields
A FormField list that contains all fields, including the OmrFormField fields within the bounds.
bounds
A LeadRect that represents the location of the SingleSelectionField to be created.
formPageNumber
Master form page number.
A SingleSelectionField field with automatically filled out field values.
Each field value is filled out with the Ocr text recognized on the right side of the corresponding OmrFormField. If no Ocr text is recognized, the user needs to fill out each SingleField value.
using Leadtools;
using Leadtools.Ocr;
using Leadtools.Forms.Common;
using Leadtools.Forms.Processing;
using Leadtools.Codecs;
using Leadtools.Forms.Auto;
///This example shows how to create a SingleSelectionField.
public void AddSingleSelectionField()
{
DiskMasterForm diskMasterForm = GetMasterForm("LeadAnswerSheet_Pattern");
LeadRect bounds = new LeadRect(3160, 3070, 1250, 1240);
FormPages formPages = diskMasterForm.ReadFields();
List<FormField> omrFields = GetOmrFields(formPages);
// Automatically create SingleSelectionField
SingleSelectionField singleSelectionField = diskMasterForm.CreateSingleSelectionField(omrFields, bounds, 1);
formPages.GetPage(1).Add(singleSelectionField);
// Write fields to master form
diskMasterForm.WriteFields(formPages);
}