This method retrieves the names, size numbers, and dimensions of the paper from the printer designated by the printer name.
Parameters
Name | Explanation |
---|---|
PaperNames | The string containing the retrieved paper names |
PaperNumbers | The array containing the retrieved paper size numbers
* NOTE for retrieving array values: |
Width, Height | The array containing the retrieved paper dimensions
* NOTE for retrieving array values: |
Return Value
Returns the number of retrieved items. Returns 0 if unsuccessful.
Explanation
The EnumPaperSizesVariant method retrieves the names, size numbers, and dimensions of the paper 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 PaperNames string will be returned as "xxxxx,xxxxx,xxxxx,¥¥¥¥¥¥¥¥," (delimited by commas and ends with a comma). The Width and Height parameters retreieve each paper size in 0.1mm units.
Also see the EnumPaperSizes method.
Sample code:
VB.NET
Dim Ret As Integer
ImageKit1.PrintDraw.PrinterName = "EPSON LP-8200C"
Dim PaperNames As Object = Nothing
Dim PaperNumbers As Object = Nothing
Dim Width As Object = Nothing
Dim Height As Object = Nothing
Ret = ImageKit1.PrintDraw.EnumPaperSizesVariant(PaperNames, PaperNumbers, Width, Height)
If Ret < 1 Then Exit Sub
' various programming code
.........
C#.NET
int Ret;
ImageKit1.PrintDraw.PrinterName = "EPSON LP-8200C";
object PaperNames = null;
object PaperNumbers = null;
object Width = null;
object Height = null;
Ret = ImageKit1.PrintDraw.EnumPaperSizesVariant(ref PaperNames, ref PaperNumbers, ref Width, ref Height);
if (Ret < 1) return;
// various programming code
.........