PtrDevice:GetPaperSizes() Method
<< Click to Display Table of Contents >> PtrDevice:GetPaperSizes() Method |
![]() ![]() ![]() |
Purpose
To retrieve a list of paper sizes supported by the printer.
Syntax
<oPtrDevice>:GetPaperSizes() → aPapers (ARRAY)
Description
This method returns a two dimensional array that contains the paper sizes supported by the current printer. The array has the following format:
aPapers[x,1] = name of the paper ("Legal")
aPapers[x,2] = constant that Windows uses to identify the paper
See oPtrDevice:PaperSize for a listing of the Windows constants.
If the method fails, an empty array is returned.
Example
// ? the supported paper sizes
aPapers := oPtrDevice:GetPaperSizes()
for nLp := 1 to alen(aPapers)
? aPapers[nLp,1]
next nLp