Convert a batch of documents (Linux)

Language:
EN
Product-Line:
FineReader Engine
Version:
11
Platform:
Linux
KB-Type:
Code Samples Collection
Category:
Recognition, OCR: Speed & Quality
Image:
image: icon_batchprocessing.gif

You intend to process a large amount of one-page or several-page documents and want to use the resources of your computer effectively.

This sample in FineReader Engine 11 Linux shows how to use Batch Processor for processing a large amount of one-page documents.

Description

The sample processes a batch of images from the specified folder and saves them in PDF format. The following procedure of multiprocessing recognition is used:

  1. Create the Engine object using the GetEngineObject function.
  2. Load a predefined profile for your scenario using the LoadPredefinedProfile method of the Engine object.
  3. Implement the IImageSource and IFileAdapter interfaces, which provide access to the image source and files in it.
  4. Call the CreateBatchProcessor method of the Engine object to receive the BatchProcessor object.
  5. Call the Start method to initialize the processor, invoke asynchronous recognition processes, specify the source of images and processing settings.
  6. Call the GetNextProcessedPage method in a loop until the method returns 0, which means that there are no more images in the source and all the processed images have been returned to the user.
  7. The page returned by the GetNextProcessedPage method exists until the next call of this method. Therefore, if you want to save this page, you must save it before the next call of the GetNextProcessedPage method:
    1. Call the Synthesize method of the FRPage object.
    2. Call the Export method of the FRPage object to save the page into a file of the specified format.
  8. Unload FineReader Engine — use the DeinitializeEngine function.


Back To:

This website uses cookies which enable you to see pages or use other functions of our websites. You can turn off such cookies in your browser’s settings. If you continue to use these pages, you consent to the use of cookies.