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





In This Topic
PrintGetPaperBin Method (GdPictureImaging)
In This Topic
Returns the paper source, means the paper tray, from which the printer gets paper, used by the active printer. The value is determined through the PaperSource.Kind property of the default page settings.
Syntax
'Declaration
 
Public Function PrintGetPaperBin() As Integer
public int PrintGetPaperBin()
public function PrintGetPaperBin(): Integer; 
public function PrintGetPaperBin() : int;
public: int PrintGetPaperBin(); 
public:
int PrintGetPaperBin(); 

Return Value

The constant that represents the current paper source. Please refer to the System.Drawing.Printing.PaperSourceKind enumeration for correct values. The standard values are listed below (please see the corresponding ordering number):
  1. Upper
  2. Lower
  3. Middle
  4. Manual
  5. Enveloper
  6. ManualFeed
  7. AutomaticFeed
  8. TractorFeed
  9. SmallFormat
  10. LargeFormat
  11. LargeCapacity

14. Cassette

15. FormSource

257. or greater: Custom

The GetStat method can be subsequently used or the PrintGetStat method to determine if this method has been successful.

Remarks
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 bin used by the active printer.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int binType = gdpictureImaging.PrintGetPaperBin();
    Console.WriteLine("Paper bin type used by printer: {0}", binType.ToString());
 
    if (binType == 7) Console.WriteLine("This printer is using automatic feeder.");
}
See Also