Loads field data from the specified file.
public void LoadFields(
string fileName
)
Public Overloads Sub LoadFields( _
ByVal fileName As String _
)
public:
void LoadFields(
String^ fileName
)
fileName
The path of the file to load.
For a complete example on using the forms recognition and processing, refer to the FormProcessingEngine example.
This example loads form fields from a file.
Imports Leadtools
Imports Leadtools.Barcode
Imports Leadtools.Codecs
Imports Leadtools.Forms
Imports Leadtools.Forms.Ocr
Imports Leadtools.Forms.Processing
Imports Leadtools.Forms.Recognition
Imports Leadtools.Forms.Recognition.Barcode
Imports Leadtools.Forms.Recognition.Ocr
''' This method loads the specified master form attributes object, fields, and image.
Private 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()
Dim attributes As FormRecognitionAttributes = recognitionEngine.CreateForm(Nothing)
recognitionEngine.CloseForm(attributes)
form.Attributes = attributes
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
using Leadtools;
using Leadtools.Barcode;
using Leadtools.Codecs;
using Leadtools.Forms;
using Leadtools.Forms.Ocr;
using Leadtools.Forms.Processing;
using Leadtools.Forms.Recognition;
using Leadtools.Forms.Recognition.Barcode;
using Leadtools.Forms.Recognition.Ocr;
/// This method loads the specified master form attributes, fields, and image.
private 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 = new FormRecognitionAttributes();
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;
}
Products |
Support |
Feedback: LoadFields(String) Method - Leadtools.Forms.Processing |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.