IFRDocumentEvents Interface

This is a callback interface that is used for reporting events from the FRDocument object to the listeners. This interface is implemented on the client-side. See the detailed implementation advice for your development tool in Working with Connectable Objects. Below you can find a short summary.

In C++ you need to implement the IFRDocumentEvents interface, obtain a connection point, and "advise" object implementing the interface to the FRDocument object. As the interface is derived from the IUnknown interface, the client object should also implement the IUnknown methods.

Visual Basic users that want to receive notifications from the FRDocument object should declare it WithEvents and implement the procedures similar to the following:

Public WithEvents doc As FREngine.FRDocument
Private Sub doc_OnPageProcessed(ByVal sender As FRDocument, _
                                ByVal index As Integer, _
                                ByVal stage As PageProcessingStageEnum)
...
End Sub
    

An object receiving notifications through this interface's methods may do the following inside the methods' implementation:

  • Process any Windows messages, which is useful in applications having User Interface, to avoid the effect that the application "is not responding" during long operations.
  • Report percentage of image loading, document analysis, recognition, synthesis, and export performed.
  • Report information about document analysis, recognition, synthesis, and export completed.

Methods

Name Description
OnPageProcessed Delivers to the client information about page processing completed.
OnProgress Delivers to the client information about approximate percentage of the current operation (image loading, analysis, recognition, etc.).
OnWarning Delivers to the client tips and warnings which occurred during processing.

Samples

This sample shows how to implement a timer that will abort processing if a method call is taking too long.

C++ (COM) code

This object is used in the following code samples: EventsHandling.

See also

FRDocument

Working with Connectable Objects

17.09.2024 15:14:40

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.