This method retrieves the paper tray names and tray numbers from the printer designated by the printer name.
Parameters
Name | Explanation |
---|---|
BinNames | The string containing the retrieved paper tray names |
BinNumbers | * NOTE for retrieving array values: In Visual Basic / VB.NET, if Dim Bnum, then the arguments are returned in Bnum. In C#.NET the arguments are returned in ref Bnum. |
Return Value
Returns the number of retrieved items. Returns 0 if unsuccessful.
Explanation
The EnumPaperBinsVariant method retrieves the supported paper tray names and tray numbers from the printer designated by the printer name.
This method is recommended when using scripting or other languages that require variant types or when using 64 bit builds in VB.NET or C#.
If you need to know the number of elements in the array, the GetArrayNum method can be used to retrieve this. The BinNames string will be returned as "xxxxx,xxxxx,xxxxx,¥¥¥¥¥¥¥¥," (delimited by commas and ends with a comma).
Also see EnumPaperBins method.
Sample code:
VB.NET
Dim Ret As Integer
ImageKit1.PrintDraw.PrinterName = "EPSON LP-8200C"
Dim BinNames As Object = Nothing
Dim BinNumbers As Object = Nothing
Ret = ImageKit1.PrintDraw.EnumPaperBinsVariant(BinNames, BinNumbers)
If Ret < 1 Then Exit Sub
' various programming code
.........
C#.NET
int Ret;
ImageKit1.PrintDraw.PrinterName = "EPSON LP-8200C";
object BinNames = null;
object BinNumbers = null;
Ret = ImageKit1.PrintDraw.EnumPaperBinsVariant(ref BinNames, ref BinNumbers);
if (Ret < 1) return;
// various programming code
.........