Callback used to retrieve the result from the AutoFormsEngine
for a file.
public delegate void AutoFormsParallelRunResultFileNameCallback(
string fileName,
AutoFormsRunResult result,
int itemIndex,
object userData
)
public:
delegate void AutoFormsParallelRunResultFileNameCallback(
String^ fileName,
AutoFormsRunResult^ result,
Int32 itemIndex,
Object^ userData
)
def AutoFormsParallelRunResultFileNameCallback(self,fileName,result,itemIndex,userData):
# fileName : String, result : AutoFormsRunResult, itemIndex : Int32, userData : Object
fileName
The file path that was just processed.
result
The AutoFormsRunResult instance that contains the result.
itemIndex
The index of the processed item.
userData
The custom value obtained from either the on-demand getter method, or from the itemsUserData
list.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Forms.Common;
using Leadtools.Forms.Auto;
using Leadtools.Document;
using Leadtools.Ocr;
using Leadtools.Forms.Recognition;
using Leadtools.Forms.Processing;
using Leadtools.Barcode;
using Leadtools.Forms;
public void ResultCallback(string fileName, AutoFormsRunResult result, int itemIndex, object label)
{
if (result == null)
{
Console.WriteLine($"ERROR!!!: Failed to process {label}: [{itemIndex}] {fileName}");
}
else
{
Console.WriteLine($"Successfully processed {label}: [{itemIndex}] {fileName}");
foreach (FormPage page in result.FormFields)
{
foreach (FormField field in page)
{
Console.WriteLine($"Process for the field {field.Name} is {field.Result.Status} ");
}
}
}
}
public void ProcessFormsMultiProcessList(AutoFormsEngine autoEngine, List<string> fileNames, List<string> repositoryNames)
{
List<string> labels = fileNames.Select(fn => fn.Split('/', '\\').Last()).ToList();
List<object> labels_AsCustomDataList = labels.Select(label => label as object).ToList();
autoEngine.RunParallelPipesForList(
fileNames,
ResultCallback,
labels_AsCustomDataList,
repositoryNames,
8
);
}
Leadtools.Forms.Auto Namespace
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
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.