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:
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:
- Create the Engine object using the
InitializeEngine
function. - [optional] Load a predefined profile for your scenario using the
LoadPredefinedProfile
method of theEngine
object. - Specify sequential mode of document processing. Set
MultiProcessingMode
property ofMultiProcessingParams
object toMPM_Sequential
. - [optional, PDF only] Check for a text layer in the image file using the
IsPdfWithTextualContent
method of theEngine
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. - Call the
CreateFRDocument
or theCreateFRDocumentFromImage
method of the Engine object to create theFRDocument
object. - Use the
AddImageFile
method of theFRDocument
object to add the image file to the document. - Call the
Process
method of theFRDocument
object. - Call the
Export
method of theFRDocument
object to save the document to a file of the specified format. - Close the
FRDocument
object using theClose
method. - 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:
- No tags, yet