Creates a new SingleSelectionField with automatically filled out field values recognized by Ocr.
public SingleSelectionField CreateSingleSelectionField(
List<FormField> formFields,
LeadRect bounds,
int formPageNumber
)
Public Function CreateSingleSelectionField(
ByVal formFields As List(Of FormField
),
ByVal bounds As LeadRect,
ByVal formPageNumber As Integer) As SingleSelectionField
public:
SingleSelectionField^ CreateSingleSelectionField(
List<FormField^>^ formFields,
LeadRect^ bounds,
Int32 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.Forms.Auto;
using Leadtools.Codecs;
///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);
}
Imports Leadtools
Imports Leadtools.Ocr
Imports Leadtools.Forms.Common
Imports Leadtools.Forms.Processing
Imports Leadtools.Forms.Auto
Imports Leadtools.Codecs
''' This example shows how to create a SingleSelectionField.
Public Sub AddSingleSelectionField()
Dim diskMasterForm As DiskMasterForm = GetMasterForm("LeadAnswerSheet_Pattern")
Dim bounds As LeadRect = New LeadRect(3160, 3070, 1250, 1240)
Dim formPages As FormPages = diskMasterForm.ReadFields()
Dim omrFields As List(Of FormField) = GetOmrFields(formPages)
' Automatically create SingleSelectionField
Dim singleSelectionField As SingleSelectionField = diskMasterForm.CreateSingleSelectionField(omrFields, bounds, 1)
formPages.GetPage(1).Add(singleSelectionField)
' Write fields to master form
diskMasterForm.WriteFields(formPages)
End Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document