EventsHandling (Linux)

FineReader Engine
Code Samples Collection
Programming Aspects
image: icon_userinterface.gif

The sample demonstrates how to use callback interfaces using the FRDocument callback interface (IFRDocumentEvents) as an example. The sample illustrates how to show an information about approximate percentage of the current operation during image processing.


The procedure of reporting events from the FRDocument object to the listeners uses the methods of the IFRDocumentEvents interface. Do the following:

  1. Implement the methods of the IFRDocumentEvents interface in a callback class of your own.
  2. Create the Engine object using the GetEngineObject function.
  3. Load a predefined profile for your scenario using the LoadPredefinedProfile method of the Engine object.
  4. Call the CreateFRDocument method of the Engine object to create the FRDocument object.
  5. Add pages from an image file to the document. Use the AddImageFile method of the FRDocument object.
  6. Create a callback object of the type you implemented. To report percentage of image processing performed connect this object on the client side to notification source using the AdviseFREngineObject global method.
  7. Call the Process method of the FRDocument object.
  8. Call the Export method of the FRDocument object to save the document into a file of the specified format.
  9. Disconnect the notification source using the UnadviseFREngineObject global method.
  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.