getNumMediaTypes
Get the number of available media types.
getNumMediaTypes([in] BSTR printerName, [out, retval] int *numMediaTypes)
This function returns the number of available media types on the
specified printer.
Note: getNumMediaTypes
, getMediaTypeName
, and
getMediaTypeID
are just simple wrappers around Windows functions.
There is no requirement to use these functions if you already know the
media type ID that you want to use (e.g., from
calling DeviceCapabilities
with
the DC_MEDIATYPES
argument).
VB:
nMediaTypes = pdf.getNumMediaTypes(printerName)
For i = 0 To nMediaTypes - 1
mediaTypeName = pdf.getMediaTypeName(printerName, i)
mediaTypeID = pdf.getMediaTypeID(printerName, i)
Print("media type " & i & ": id=" & mediaTypeID & " name=" & mediaTypeName)
Next i