public string JobName { get; set; } @property (nonatomic, copy, nullable) NSString *jobName; public String getJobName()public void setJobName(String value)
JobName # get and set (OcrAutoRecognizeJobData)
A String that contains the optional job name. If tracing is enabled with IOcrAutoRecognizeManager.EnableTrace, then the engine will use this value in the trace messages. If this member is a null reference, then the trace will show the generic [Untitled] name next to the trace messages.
Note: The maximum length for this string is 79 characters. Strings longer than 79 characters are truncated to 79 characters.
using Leadtools;using Leadtools.Codecs;using Leadtools.Ocr;using Leadtools.Document.Writer;using Leadtools.Forms.Common;using Leadtools.WinForms;private AutoResetEvent _jobFinishedEvent;public void RunJobAsyncExample(){string tifFileName = Path.Combine(LEAD_VARS.ImagesDir, "Ocr1.tif");string pdfFileName = Path.Combine(LEAD_VARS.ImagesDir, "Ocr1.pdf");// Create an instance of the engineusing (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD)){// Start the engine using default parametersConsole.WriteLine("Starting up the engine...");ocrEngine.Startup(null, null, null, LEAD_VARS.OcrLEADRuntimeDir);IOcrAutoRecognizeManager ocrAutoRecognizeManager = ocrEngine.AutoRecognizeManager;// Create the jobOcrAutoRecognizeJobData ocrJobData = new OcrAutoRecognizeJobData(tifFileName, DocumentFormat.Pdf, pdfFileName);ocrJobData.JobName = "MyJob";IOcrAutoRecognizeJob ocrJob = ocrAutoRecognizeManager.CreateJob(ocrJobData);// Create the event_jobFinishedEvent = new AutoResetEvent(false);// Run the job in a thread and wait for it to be done// We will use the JobCompleted event to get notified when// the job is finishedocrAutoRecognizeManager.JobCompleted += new EventHandler<OcrAutoRecognizeRunJobEventArgs>(ocrAutoRecognizeManager_JobCompleted);Console.WriteLine("Running the job...");ocrAutoRecognizeManager.RunJobAsync(ocrJob);Console.WriteLine("Waiting for the job to complete...");_jobFinishedEvent.WaitOne();Console.WriteLine("Done...");_jobFinishedEvent.Close();ocrAutoRecognizeManager.JobCompleted -= new EventHandler<OcrAutoRecognizeRunJobEventArgs>(ocrAutoRecognizeManager_JobCompleted);}}private void ocrAutoRecognizeManager_JobCompleted(object sender, OcrAutoRecognizeRunJobEventArgs e){// Tell main thread we are done_jobFinishedEvent.Set();}static class LEAD_VARS{public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";public const string OcrLEADRuntimeDir = @"C:\LEADTOOLS22\Bin\Common\OcrLEADRuntime";}
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
