Convert a document - 'Hello' Code Sample (Windows)

Language:
EN
Product-Line:
FineReader Engine
Version:
11, 12
Platform:
Windows
Type:
Knowledge Base & Support
KB-Type:
Code Samples Collection
KB-Topic:
Recognition, General, Programming Aspects, Export
Category:
Recognition, Export
Coding:
C++, C++ COM, C#, Visual Basic .NET, Delphi, Java
Image:
image: icon_simplerec.gif

You are new to ABBYY FineReader Engine and are looking for a way to recognize an image and export recognition results. This sample shows all the steps you need to perform to make your ABBYY SDK work for you.

Description

Precompiled 'Hello' Sample

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 GetEngineObject function (version 11) or the InitializeEngine function (version 12).
  2. [optional] Load a predefined profile for your scenario using the LoadPredefinedProfile method of the Engine object.
  3. [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.
  4. Call the CreateFRDocument method of the Engine object to create the FRDocument object.
  5. Add pages from the image file to the document. Use the AddImageFile method of the FRDocument object.
  6. [optional] Create the DocumentProcessingParams object and set the page processing parameters (for preprocessing, analysis, and recognition) and document synthesis parameters.
  7. Call the Process method of the FRDocument object.
  8. [optional] Create an export parameter object of the type you need. The type of this object depends on the format of the output file you would like to use (FileExportFormatEnum). The default object values are the ones used most frequently, but you may set the export parameters as you like.
  9. Call the Export method of the FRDocument object to save the document to a file of the specified format.
  10. Close the FRDocument object using the Close method.
  11. 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.
  • No tags, yet