ImageViewer Object (IImageViewer Interface)

The ImageViewer object is an ActiveX control which allows you to view and edit an image and blocks on this image. An image is connected to Image Viewer via the FRPage property.

The Image Viewer component looks like this:

You can modify the appearance of the component via its properties. For example, you can add buttons to its toolbar and remove them from it via the Toolbar property, or modify the context menu of the component via the PopupMenu property. See Customizing the Context Menu and Toolbar of a Visual Component for details.

The information about viewing and editing the image is reported through special outgoing interfaces. These interfaces are IImageViewerEvents (for C++) and a dispinterface DIImageViewerEvents (for Visual Basic).

It's worth noting that Visual Basic users should not care for details of event interfaces implementation as this development platform provides easy means for handling them. This object may be declared WithEvents in Visual Basic.

For C++ user this fact means that it supports the IConnectionPointContainer interface. To receive notification events, a C++ user should create an object derived from the IImageViewerEvents interface, then set up the connection between it and events source implemented in ImageViewer object by standard COM means.

The Image Viewer component can be connected to the Component Synchronizer component, in which case all the events in Image Viewer will be automatically transmitted to other components connected to the Synchronizer and the whole application will work synchronously.


Name Type Description
ActiveTool BoxEditorToolEnum Specifies the active tool for blocks and image editing.
AllPagesScrollEnabled Boolean

Specifies whether Image Viewer should scroll through all pages of the document. If this property is FALSE, Image Viewer scrolls through the selected page only.

By default, the value is TRUE.

BottomPaneEnabled VARIANT_BOOL

Specifies whether the bottom pane of Image Viewer is enabled. If this property is FALSE, bottom pane is not displayed.

By default, the value is TRUE.

CaptionPaneEnabled VARIANT_BOOL

Specifies whether the caption pane of Image Viewer is enabled. If this property is FALSE, caption pane is not displayed.

By default, the value is TRUE.

ContextMenuEnabled VARIANT_BOOL

Specifies whether the context menu of Image Viewer is enabled. If this property is FALSE, context menu is never displayed.

By default, the value is TRUE.

Commands Commands, read-only Provides access to the commands available in Image Viewer. See the list of commands available in Image Viewer.
FRPage FRPage Specifies the document page connected to Image Viewer.
HighlightRecognizedArea VARIANT_BOOL

Specifies whether recognized fragments should be highlighted on the image during recognition. This property allows you to watch the progress of recognition.

By default, the value is TRUE.


Specifies whether Image Viewer is locked.

This property is useful in the following situations:

  • analysis, recognition, synthesis, or export operation is called from FineReader Engine API (not from Visual Components), or
  • your application receives notifications of certain events (e.g., from the FRDocument object) and processes Windows messages from Visual Components in these events handlers.

In this case, we recommend that you set this property to TRUE before analysis, recognition, synthesis or export, and set it to FALSE after the end of the operation. In this case, the document cannot be spoilt from Image Viewer.

By default, the value is FALSE.

PopupMenu PopupMenu, read-only Provides access to the settings of the context menu.
ProcessingParams DocumentProcessingParams

Specifies the default processing parameters for a document. These parameters are used if analysis, recognition, and synthesis processes are called directly from Image Viewer.

Note: If Image Viewer is connected to Component Synchronizer, use the IComponentSynchronizer::ProcessingParams property to change parameters used for processing. If you change processing parameters via the property of Image Viewer, errors may occur.

SelectedPagesIndices IntsCollection Provides access to the collection of indices of the pages selected in the Image Editor dialog box.
SettingsPath BSTR

Specifies the path to the folder which contains files with the settings of Image Viewer. Other Visual Components have the same property. Each Visual Component should use its own folder with settings.

The value of this property is constructed from the path to the folder, in which ABBYY FineReader Engine stores user-specific data, and the name of its subfolder. By default, the folder with user-specific data is the FineReader Engine data folder. It can be changed during initialization of FineReader Engine. The default name of the subfolder is an arbitrary GUID. To change the name of the subfolder, you should specify the new name in the properties of the component in Visual Studio at design time. If you try to specify the value of the property at run time, this value is ignored.

If you add the component to a form in Visual Studio when designing, the value of the property is defined either automatically with the default value, or manually with a custom value. In both cases the value is defined at design time. If for some reason the value of the property is not defined at design time (e.g., if you generate the component dynamically at run time), the component creates a new folder with the settings each time the component is initialized. To avoid multiplication of the folders, you should delete the created settings folder after the component deinitialization. In this case, you can use only the default settings of the component and cannot save the settings between sessions.

Title BSTR

Specifies the title of the Image Viewer component.

By default, it is "Image".

Toolbar Toolbar, read-only Provides access to the toolbar settings.
ViewScale int

Specifies the scale of the image in percentage points. This property can be also set to one of the ScaleTypes constants.

By default, the value is ST_BestFit, which means that the best fit is automatically selected.

VisibleDocumentArea FRRectangle, read-only Stores the coordinates of the visible document area in pixels. The coordinates are relative to the document image.
WindowHandle __int64, read-only Returns the window handle of the client area.
ZoomRect FRRectangle Stores the coordinates of the zoom area rectangle in pixels. The coordinates are relative to the document image.
ZoomRectEnabled VARIANT_BOOL

Specifies whether the zoom area should be marked on the image with dotted rectangle.

By default, the value is TRUE.


Name Description
CenterOnDocumentPoint Scrolls image view so that the specified point is positioned at the center of the view.
DocumentToScreen Converts coordinates of the specified point on the document image into screen coordinates.
GetSelectedBlocksIndices Returns the collection of indices of selected blocks.
GetSelectedCells Returns the surrounding rectangle of selected cells in the specified table block.
Print Prints the image.
ScreenToDocument Converts screen coordinates of the specified point into coordinates on the document image.
SetSelectedBlocksIndices Sets blocks selection.
SetSelectedCells Sets selected cells of the specified table block.
ShowDocumentArea Scrolls image view so that the document area with the specified coordinates becomes visible (as far as possible).
UpdateOptions Updates the settings specified in the Options dialog box of Image Viewer. You may need to call this method, if the options have been changed in some other Visual Component, to update the options of Image Viewer to the current state.


This component is used in the following code samples: VisualComponents.

See also



Creating an Application with a Graphical User Interface

Customizing the Context Menu and Toolbar of a Visual Component

Working with Properties

24.03.2023 8:51:52

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.