'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
GdViewer1.RectBorderColor = GdViewer1.ARGB(255, 69, 0)
GdViewer1.RectBorderSize = 2
'You can change the zoom mode here.
GdViewer1.ZoomMode = GdPicture14.ViewerZoomMode.ZoomModeToViewer
'Setting the rectangle of selection.
Dim left As Integer = 0, top As Integer = 0, width As Integer = 0, height As Integer = 0
GdViewer1.GetDisplayedArea(left, top, width, height)
GdViewer1.SetRectCoordinatesOnDocument(left, top, width, height)
'Finding coordinates to compare.
Dim heightViewer As Integer = GdViewer1.GetRectHeightOnDocument()
Dim heightDoc As Integer = GdViewer1.GetRectHeightOnViewer()
MessageBox.Show("The height on the viewer is " + widthViewer + " pixels." + vbCrLf +
"The height on the document's page is " + widthDoc + " pixels.", "GdViewer.GetRectHeightOnViewer")
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
GdViewer1.RectBorderColor = GdViewer1.ARGB(255, 69, 0);
GdViewer1.RectBorderSize = 2;
//You can change the zoom mode here.
GdViewer1.ZoomMode = GdPicture14.ViewerZoomMode.ZoomModeToViewer;
//Setting the rectangle of selection.
int left = 0, top = 0, width = 0, height = 0;
GdViewer1.GetDisplayedArea(ref left, ref top, ref width, ref height);
GdViewer1.SetRectCoordinatesOnDocument(left, top, width, height);
//Finding coordinates to compare.
int heightViewer = GdViewer1.GetRectHeightOnDocument();
int heightDoc = GdViewer1.GetRectHeightOnViewer();
MessageBox.Show("The height on the viewer is " + widthViewer + " pixels.\nThe height on the document's page is " + widthDoc + " pixels.", "GdViewer.GetRectHeightOnViewer");