getPaperSize
Get a paper size.
getPaperSize([in] BSTR printerName, [in] int paperIdx, [out] int *width, [out] int *height)
This function retrieves the size of
the
paperIdx
th available paper, on the
specified printer.
paperIdx
must be between 0 and n-1, where n is the
value returned by getNumPapers
.
The paper size will be returned in width
and height
, both in tenths of millimeters.
Note: getNumPapers
, getPaperName
, getPaperID
,
and getPaperSize
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 = pdf.getNumPapers(printerName)
For i = 0 To nPapers - 1
paperName = pdf.getPaperName(printerName, i)
paperID = pdf.getPaperID(printerName, i)
Dim w As Long, h As Long
getPaperSize(printerName, i, w, h)
Print("paper " & i & ": id=" & paperID & " name=" & paperName & _
" size=" & (0.1 * w) & "x" & (0.1 * h))
Next i