GdPicture.NET Reference Guide
PrintGetPaperWidth Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : PrintGetPaperWidth Method
Gets the paper width used by the active printer.
Syntax
'Declaration
 
Public Function PrintGetPaperWidth() As Single
public float PrintGetPaperWidth()
public function PrintGetPaperWidth(): Single; 
public function PrintGetPaperWidth() : float;
public: float PrintGetPaperWidth(); 
public:
float PrintGetPaperWidth(); 

Return Value

The paper width in Inches.
Example
Obtaining the width of the paper to be printed on.
Dim oGdPictureImaging As New oGdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("multipage.tif")
If imageId <> 0 Then
   Dim pageCount As Integer = oGdPictureImaging.TiffGetPageCount(ImageID)
   If pageCount > 1 Then
      oGdPictureImaging.PrintSetFromToPage(1, pageCount)
   End If
   If oGdPictureImaging.PrintGetPaperHeight() <> 300.0 Or oGdPictureImaging.PrintGetPaperWidth() <> 150.0 Then
      oGdPictureImaging.PrintSetPaperSize(150.0, 300.0)
   End If
   oGdPictureImaging.Print(ImageID)
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
PrintGetPaperSize Method
PrintGetPaperHeight Method