GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / PrintGetPaperWidth Method
Example





In This Topic
PrintGetPaperWidth Method (GdPictureImaging)
In This Topic
Returns the width of the paper to be 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.
Remarks
It is recommend to use the GetStat method or the PrintGetStat method to identify the specific reason for the method's failure, if any.

Just to remind you that the active printer is the printer identified by the PrintGetActivePrinter method or set by the PrintSetActivePrinter method and it is dedicated to executing all subsequent print jobs using this class as well as utilizing all by you altered printer settings.

Example
Determining information about the paper size used by the active printer.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    Console.WriteLine("Paper size information:");
    Console.WriteLine("Paper width: {0} inches", gdpictureImaging.PrintGetPaperWidth().ToString());
    Console.WriteLine("Paper height: {0} inches", gdpictureImaging.PrintGetPaperHeight().ToString());
}
See Also