GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / PageRotation Property
Example





In This Topic
PageRotation Property (GdViewer)
In This Topic
Returns the rotation and flipping of the current page of the document displayed in the GdViewer control.
Syntax
'Declaration
 
Public ReadOnly Property PageRotation As RotateFlipType
public RotateFlipType PageRotation {get;}
public read-only property PageRotation: RotateFlipType; 
public function get PageRotation : RotateFlipType
public: __property RotateFlipType get_PageRotation();
public:
property RotateFlipType PageRotation {
   RotateFlipType get();
}

Property Value

A member of the System.Drawing.RotateFlipType enumeration. The current page rotation and flipping.
Remarks
You can use the Rotate method to rotate a single page in the control.
Example
How to rotate the current page upside down in the viewer and find out the final page rotation value.
'We assume that the GdViewer1 control has been properly integrated.
If GdViewer1.DisplayFromFile("") = GdPictureStatus.OK Then
    Dim rotation As RotateFlipType = RotateFlipType.Rotate180FlipNone
    If GdViewer1.Rotate(rotation) = GdPictureStatus.OK Then
        MessageBox.Show("The current page is rotated: " + GdViewer1.PageRotation.ToString(), "GdViewer.PageRotation");
    Else
        MessageBox.Show("The current page can't be rotated. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.PageRotation")
    End If
Else
    MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.PageRotation")
End If
//We assume that the GdViewer1 control has been properly integrated.
if (GdViewer1.DisplayFromFile("") == GdPictureStatus.OK)
{
    RotateFlipType rotation = RotateFlipType.Rotate180FlipNone;
    if (GdViewer1.Rotate(rotation) = GdPictureStatus.OK)
        MessageBox.Show("The current page is rotated: " + GdViewer1.PageRotation.ToString(), "GdViewer.PageRotation");
    else
        MessageBox.Show("The current page can't be rotated. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.PageRotation");
}
else
    MessageBox.Show("The file can't be loaded. Status: " + GdViewer1.GetStat().ToString(), "GdViewer.PageRotation");
See Also