public string DocumentFileName { get; } @property (nonatomic, copy, readonly, nullable) NSString *documentFileName; public String getDocumentFileName() public:property String^ DocumentFileName {String^ get();}
DocumentFileName # get (OcrAutoRecognizeJobOperationEventArgs)
The name of the document file being saved in the current operation.
This member will be equal to the original OcrAutoRecognizeJobData.DocumentFileName value except for the following operations: SavePage and AppendLtd where it will be destination file name or SaveDocument where it can either be the original document file name or the name of a temporary LTD file if LTD is being used to create a temporary document during recognition.
using Leadtools;using Leadtools.Codecs;using Leadtools.Ocr;using Leadtools.Document.Writer;using Leadtools.Forms.Common;using Leadtools.WinForms;public void JobOperationExample(){string imageFileName = Path.Combine(LEAD_VARS.ImagesDir, "Ocr1.tif");string documentFileName = Path.Combine(LEAD_VARS.ImagesDir, "JobOperation.pdf");using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD)){ocrEngine.Startup(null, null, null, LEAD_VARS.OcrLEADRuntimeDir);IOcrAutoRecognizeManager autoRecognizeManager = ocrEngine.AutoRecognizeManager;autoRecognizeManager.JobOperation += new EventHandler<OcrAutoRecognizeJobOperationEventArgs>(autoRecognizeManager_JobOperation);IOcrAutoRecognizeJob job = autoRecognizeManager.CreateJob(new OcrAutoRecognizeJobData(imageFileName, DocumentFormat.Pdf, documentFileName));autoRecognizeManager.RunJob(job);autoRecognizeManager.JobOperation -= new EventHandler<OcrAutoRecognizeJobOperationEventArgs>(autoRecognizeManager_JobOperation);}}private static void autoRecognizeManager_JobOperation(object sender, OcrAutoRecognizeJobOperationEventArgs e){// We did not pass a zone to the job, so the engine will attempt to do AutoZone unless we// add any zone to the input document.// We can also check for e.PostOperation equals to true and manipulate the zones// found the engine at this point// Add a graphics zone.// If you comment out this code, the result PDF will contain text, but since we will be adding a zone here,// the engine will not auto-zone the document for us. Also, since the zone we are adding is// graphics that takes up the whole page, the result PDF will contain a raster image and no text.if (!e.PostOperation && e.ImagePageNumber == 1){OcrZone ocrZone = new OcrZone();ocrZone.ZoneType = OcrZoneType.Graphic;ocrZone.Bounds = new LeadRect(0, 0, e.Page.Width, e.Page.Height);e.Page.Zones.Add(ocrZone);}}static class LEAD_VARS{public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";public const string OcrLEADRuntimeDir = @"C:\LEADTOOLS22\Bin\Common\OcrLEADRuntime";}
OcrAutoRecognizeJobOperationEventArgs 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
