DocViewer properties

The document viewer is always located on a validation form and has the following customizable properties:

ActivePageIndex

Returns the zero-based page index of the displayed page. For Thin Clients this status property may return an unpredictable value during the DocumentLoaded event.

DisplayPage

Displays the page specified by zero-based page index in the document viewer.

DisplayPage(ByVal PageIndex As Long)
XOffSet

Returns the offset in X direction. The property is not supported for Thin Clients. If needed, you can use the ProjectExecutionModuleType property to ensure that it is executed for rich clients only. This property is read-only and cannot be changed.

YOffSet

Returns the offset in Y direction. The property is not supported for Thin Clients. If needed, you can use the ProjectExecutionModuleType property to ensure that it is executed for rich clients only. This property is read-only and cannot be changed.

ZoomIn

Increases the size of the document in the viewer.

ZoomMode

Sets or returns one of the following zoom modes for the document viewer.

  • CSCBestFit - Displays document so that it is fully visible inside viewer.

  • CSCFitToWidth - Displays document so that it fits to width of viewer.

  • CSCFitToHeight - Displays document so that it fits to height of viewer.

  • CSCCustomZoom - Document resized according to current zoom value.

ZoomOut

Decreases the size of the document in the viewer.

ZoomToRectangle

Zooms to a rectangle in the document defined by the left position x, the top position y, width, and height.

ZoomToRectangle(ByVal x As Long, ByVal y As Long, ByVal Width As Long, ByVal Height As Long)

ZoomValue

Sets or returns the zoom value.

Important For Thin Clients you can use only one zoom operation, such as ZoomIn, ZoomOut, ZoomValue, ZoomToRectangle and ZoomMode, per event for the document viewer. If you implement several ones within the same event the last zoom operation is applied to the document all other zoom operations are ignored.