Chinese Simplified (简体中文)

ZoomViewer Object (IZoomViewer Interface)

The ZoomViewer object is an ActiveX control that allows you to view an enlarged image of the line or processed image area currently being edited. While Image Viewer displays the general page view, Zoom Viewer provides an easy way to view the image in greater detail, adjust the area position, or compare uncertain characters with the enlarged image. An image is connected to Zoom Viewer via the FRPage property.

The Zoom Viewer component looks like this:

You can modify the appearance of the component via its properties. For example, you can modify the context menu of the component via the Commands property. See Customizing the Context Menu and Toolbar of a Visual Component for details.

The information about viewing an image is reported through special outgoing interfaces. These interfaces are IZoomViewerEvents (for C++) and a dispinterface DIZoomViewerEvents (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 IZoomViewerEvents interface, then set up the connection between it and events source implemented in ZoomViewer object by standard COM means.

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

Properties

Name Type Description
ActiveTool BoxEditorToolEnum Specifies the active tool for blocks and image editing.
BottomPaneEnabled VARIANT_BOOL

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

By default, the value is TRUE.

ContextMenuEnabled VARIANT_BOOL

Specifies whether the context menu of Zoom 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 Zoom Viewer. See the list of commands available in Zoom Viewer.
FRPage FRPage Represents the document page connected to Zoom Viewer.
Locked VARIANT_BOOL

Specifies whether Zoom 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 Zoom Viewer.

By default, the value is FALSE.

ProcessingParams DocumentProcessingParams

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

Note: If Zoom 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 Zoom Viewer, errors may occur.

SettingsPath BSTR

Specifies the path to the folder which contains files with the settings of Zoom 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 (via the InitializeEngine function, or via the IEngineLoader::InitializeEngine method). 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.

SymbolRect FRRectangle Stores the coordinates of the current character rectangle in pixels. The coordinates are relative to the document image.
SymbolRectEnabled VARIANT_BOOL

Specifies whether the current character should be marked with a yellow rectangle.

By default, the value is TRUE.

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_PixelToPixel, which means that the image is displayed in the pixel-to-pixel mode.

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.

Methods

Name Description
CenterOnDocumentPoint Scrolls zoom 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.
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 zoom 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 Zoom Viewer. You may need to call this method, if the options have been changed in some other Visual Component, to update the options of Zoom Viewer to the current state.

Samples

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

See also

IZoomViewerEvents

IComponentSynchronizer::ZoomViewer

Creating an Application with a Graphical User Interface

Customizing the Context Menu and Toolbar of a Visual Component

17.09.2024 15:14:41

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.