Visual Components Sample FineReader Engine 11

Language:
EN
Product-Line:
FineReader Engine
Version:
10, 11
Platform:
Windows
KB-Type:
Code Samples Collection
Category:
OCR: Speed & Quality, Verification & User Interaction
Image:
image: icon_userinterface.gif

This sample illustrates all the steps you need to perform to create a simple application with graphical user interface similar to that of ABBYY FineReader. The sample allows you to open an image, recognize it, verify recognition results and save recognized text in RTF format.

Description

The sample uses ABBYY FineReader Engine Visual Components to display an image and recognized text and basic objects and methods of ABBYY FineReader Engine API to process the image. Do the following:

  1. Add necessary Visual Components to the form of your application. The sample uses ImageViewer, ZoomViewer, DocumentViewer, and TextEditor components on the main form.
  2. In order that these components can work synchronously, connect them to the ComponentSynchronizer object using corresponding properties of the object.
  3. To open an image file:
    1. Create the Engine object using the GetEngineObject function.
    2. Call the CreateFRDocumentFromImage method of the Engine object to open the image file and create the FRDocument object.
    3. Attach the opened image to Visual Components using the Document property of the ComponentSynchronizer object.
  4. To recognize the file using FineReader Engine API:
    1. [optional] Create the PageProcessingParams object and set the parameters of analysis and recognition.
    2. [optional] Create the SynthesisParamsForPage object and set the parameters of the page synthesis.
    3. [optional] Create the SynthesisParamsForDocument object and set the parameters of the document synthesis.
    4. Call the Process method of the FRDocument object.
      Note that recognition process can also be invoked using the commands available in the ImageViewer.
  5. To check recognition results:
    1. You can create a new form for TextValidator component or add it to the existing form.
    2. Attach the TextValidator component to the ComponentSynchronizer object. Use the TextValidator property of the ComponentSynchronizer object.
    3. Call the Spell method of the TextValidator object to start spell checking.
      The same process can be invoked using the Check Spelling button in the TextEditor.
  6. To save recognized text:
    1. [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.
    2. Call the Export method of the FRDocument object to save the document into a file of the specified format.
    3. Call the Close method of the FRDocument object to release resources.
      Note that the process of export can be invoked using the commands available in the DocumentViewer.
  7. To unload ABBYY 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.