getMediaTypeName

Get a media type name.
getMediaTypeName([in] BSTR printerName, [in] int mediaTypeIdx, [out, retval] BSTR *mediaTypeName)
This function returns the name of the mediaTypeIdxth available media type, on the specified printer.

mediaTypeIdx must be between 0 and n-1, where n is the value returned by getNumMediaTypes.

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
getNumMediaTypes
getMediaTypeID