Convert a document in a separate process - 'Hello (Outproc)' Code Sample (Linux)

Language:
EN
Product-Line:
FineReader Engine
Version:
12
Platform:
Linux
Type:
Knowledge Base & Support
KB-Type:
Code Samples Collection
KB-Topic:
Recognition, General, Programming Aspects, Export
Category:
Recognition, Export
Coding:
C++, Java
Image:
image: doc_conv_icon.gif

This sample is a version of basic Hello sample for case when the Engine is loaded as an out-of process server into a separate process. The main scenario, the objects and called methods remain the same as in the standard Hello sample. For loading the Engine as an out-of-process server OutprocEngineLoader.h file is included instead of FREngineLoader.h file.

Description

The procedure of recognizing and exporting an image file uses the basic objects and methods of ABBYY FineReader Engine.

Do the following:

  1. Create the Engine object using the InitializeEngine function.
  2. [optional] Load a predefined profile for your scenario using the LoadPredefinedProfile method of the Engine object.
  3. Specify sequential mode of document processing. Set MultiProcessingMode property of MultiProcessingParams object to MPM_Sequential.
  4. [optional, PDF only] Check for a text layer in the image file using the IsPdfWithTextualContent method of the Engine object. If the text layer exists, you can copy the file without recognition, speeding up the processing. However, note that the text layer can be irrelevant.
  5. Call the CreateFRDocument or the CreateFRDocumentFromImage method of the Engine object to create the FRDocument object.
  6. Use the AddImageFile method of the FRDocument object to add the image file to the document.
  7. Call the Process method of the FRDocument object.
  8. Call the Export method of the FRDocument object to save the document to a file of the specified format.
  9. Close the FRDocument object using the Close method.
  10. Unload FineReader Engine — use the DeinitializeEngine function.

For the description of used objects and their methods and properties see the Developer's Help.


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.
  • No tags, yet