Example





In This Topic
GdPicture14.WPF Namespace / GdViewer Class / PageInchHeight Property

PageInchHeight Property

In This Topic
Returns the height, in inches, of the current page of the document displayed in the GdViewer control.
Syntax
'Declaration
 
Public ReadOnly Property PageInchHeight As Double
public double PageInchHeight {get;}
public read-only property PageInchHeight: Double; 
public function get PageInchHeight : double
public: __property double get_PageInchHeight();
public:
property double PageInchHeight {
   double get();
}

Property Value

The current page height, in inches.
Example
How to determine the fully visible rectangle of the current page within the viewer.
'We assume that the GdViewer1 control has been properly integrated
'and your document has been properly displayed as well.
Dim left As Double = 0, top As Double = 0, width As Double = 0, height As Double = 0
GdViewer1.GetDisplayedAreaInch(left, top, width, height)
MessageBox.Show("Page width (X): " + (GdViewer1.PageInchWidth).ToString() + vbCrLf + "Page height (Y): " + (GdViewer1.PageInchHeight).ToString() + vbCrLf + vbCrLf +
                "Displayed area:" + vbCrLf + "  top-left point (X,Y): " + left + ", " + top + vbCrLf + "  width: " + width + "  height: " + height, "GdViewer.PageInchHeight")
//We assume that the GdViewer1 control has been properly integrated
//and your document has been properly displayed as well.
double left = 0, top = 0, width = 0, height = 0;
GdViewer1.GetDisplayedAreaInch(ref left, ref top, ref width, ref height);
MessageBox.Show("Page width (X): " + (GdViewer1.PageInchWidth).ToString() + "\nPage height (Y): " + (GdViewer1.PageInchHeight).ToString() + "\n\n" +
                "Displayed area:\n  top-left point (X,Y): " + left + ", " + top + "\n  width: " + width + "  height: " + height, "GdViewer.PageInchHeight");
See Also