How to use BatchProcessing in the FineReader Engine 11

Question

How to use BatchProcessing in the FineReader Engine 11?

Answer

This method should be used for many documents with few pages; the process after assembling is distributed and maintained on 1 core:

//Create Batch Processor
FREngine.BatchProcessor batchProcessor = engine.CreateBatchProcessor();
//Set up mutiprocessing parameters
engine.MultiProcessingParams.RecognitionProcessesCount = numberOfCores;
//Initialize the processor
FREngine.IImageSource imageSource = new CImageSource(); //the class is implemented bu the user
batchProcessor.Start (imageSource, null, null, null);
//Start processing

while (true)
{
  FREngine.FRPage page = batchProcessor.GetNextProcessedPage();
  if  (page == null)
    {break; // there are no more pages, end of the work
    }
//do smth with page
page.Synthesize (null);
page.Export ("D:\\sample.pdf", FREingene.FileExportFormatEnum.FEF_PDF,null);
}

 

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Recently viewed