public IOcrAutoRecognizeJob Job { get; }
public:
property IOcrAutoRecognizeJob^ Job {
IOcrAutoRecognizeJob^ get();
}
Job # get (OcrAutoRecognizeJobProgressEventArgs)
An object of type IOcrAutoRecognizeJob that specifies the job that triggered the event.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Ocr;
using Leadtools.Document.Writer;
using Leadtools.Forms.Common;
using Leadtools.WinForms;
public void JobProgressExample()
{
string tifFileName = Path.Combine(LEAD_VARS.ImagesDir, "Ocr1.tif");
string pdfFileName = Path.Combine(LEAD_VARS.ImagesDir, "Ocr1.pdf");
// Create an instance of the engine
using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD))
{
// Start the engine using default parameters
Console.WriteLine("Starting up the engine...");
ocrEngine.Startup(null, null, null, LEAD_VARS.OcrLEADRuntimeDir);
IOcrAutoRecognizeManager ocrAutoRecognizeManager = ocrEngine.AutoRecognizeManager;
// Run the job in 1 thread
ocrAutoRecognizeManager.MaximumThreadsPerJob = 1;
// Create the job
OcrAutoRecognizeJobData ocrJobData = new OcrAutoRecognizeJobData(tifFileName, DocumentFormat.Pdf, pdfFileName);
ocrJobData.JobName = "MyJob";
IOcrAutoRecognizeJob ocrJob = ocrAutoRecognizeManager.CreateJob(ocrJobData);
// Subscribe to the JobProgress event
ocrAutoRecognizeManager.JobProgress += new EventHandler<OcrAutoRecognizeJobProgressEventArgs>(ocrAutoRecognizeManager_JobProgress);
// Run the job
ocrAutoRecognizeManager.RunJob(ocrJob);
// Unsubscribe to the JobProgress event
ocrAutoRecognizeManager.JobProgress -= new EventHandler<OcrAutoRecognizeJobProgressEventArgs>(ocrAutoRecognizeManager_JobProgress);
}
}
private static void ocrAutoRecognizeManager_JobProgress(object sender, OcrAutoRecognizeJobProgressEventArgs e)
{
Console.WriteLine(string.Format("Job: {0} - Page: {1}:{2} - {3} - {4}%",
e.Job.JobData.JobName, e.Data.CurrentPageIndex + 1, e.Data.LastPageIndex + 1, e.Data.Operation, e.Data.Percentage));
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
public const string OcrLEADRuntimeDir = @"C:\LEADTOOLS22\Bin\Common\OcrLEADRuntime";
}
OcrAutoRecognizeJobProgressEventArgs Class
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.