This 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
Parameters
Name | Explanation |
---|---|
PaperNames | The string containing the retrieved paper names |
PaperNumbers | The array containing the retrieved paper size numbers
In Visual Basic, Dim Pnum(0 To 2) As Integer then set Pnum(0) |
Width, Height | The array containing the retrieved paper dimensions
In Visual Basic, Dim Width(0 To 2) As Integer then set Width |
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.
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.
Note: In VB.NET and C#.NET, you cannot retrieve the string for PaperNames. Use InvokeMembers instead. For details, please see the code example on the EnumPaperSizes method.