Convert a document - 'SAFEARRAY_Hello' Code Sample (Linux)

FineReader Engine
Knowledge Base & Support
Code Samples Collection
Recognition, General, Programming Aspects, Export
Recognition, Export
image: doc_conv_icon.gif

This sample demonstrates how ABBYY FineReader Engine Linux may be used for document processing with the SAFEARRAY type usage. The main scenario, the objects and called methods remain the same as in the standard Hello sample.


The procedure of recognizing and exporting an image file uses the basic objects and methods of ABBYY FineReader Engine. In this sample we implement the IReadStream and IFileWriter interfaces to load images and save the processing results. Both implementations use the SAFEARRAY data type.

Do the following:

  1. Create the Engine object using the InitializeEngine function.
  2. Call the CreateFRDocument method of the Engine object to create the FRDocument object.
  3. Open an image file from the input stream and add the pages corresponding to the opened file to the document. Use the AddImageFileFromStream method of the FRDocument object.
  4. Preprocess all pages in the document with the Preprocess method of the FRDocument object.
  5. Perform the layout analysis of all pages in a document with the Analyze method of the FRDocument object.
  6. Perform recognition of all pages in the document with the Recognize method of the FRDocument object.
  7. Perform synthesis of all pages in the document with the Synthesize method of the FRDocument object.
  8. Call the ExportToMemory method of the FRDocument object to save the document into memory in an external format.
  9. 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