getPrinterPaperID
Get a paper size ID.
getPrinterPaperID([in] BSTR printerName, [in] int paperIdx, [out, retval] int *paperID)
This function returns the ID for
the
paperIdx
th available paper size, on the
specified printer.
paperIdx
must be between 0 and n-1, where n is the value
returned by getNumPrinterPapers
.
The returned value can be used to set the printPaper
property.
Note: getNumPrinterPapers
, getPrinterPaperName
,
and getPrinterPaperID
are just simple wrappers around
Windows functions. There is no requirement to use these functions if
you already know the paper ID that you want to use (e.g., from
calling DeviceCapabilities
with
the DC_PAPERS
argument).
VB:
nPapers = viewer.getNumPrinterPapers(printerName)
For i = 0 To nPapers - 1
paperName = viewer.getPrinterPaperName(printerName, i)
paperID = viewer.getPrinterPaperID(printerName, i)
Print("paper " & i & ": id=" & paperID & " name=" & paperName)
Next i