win32print.DeviceCapabilities

DeviceCapabilities(Device, Port, Capability, DEVMODE)

Queries a printer for its capabilities

Parameters

Device : string

Name of printer

Port : string

Port that printer is using

Capability : int

Type of capability to return - DC_* constant

DEVMODE=None : PyDEVMODE

If present, function returns values from it, otherwise the printer defaults are used

Capability Returned value
DC_MINEXTENTDictionary containing minimum paper width and height
DC_MAXEXTENTDictionary containing maximum paper width and height
DC_ENUMRESOLUTIONSSequence of dictionaries containing x and y resolutions in DPI
DC_PAPERSReturns a sequence of ints, DMPAPER_* constants
DC_BINSReturns a sequence of ints, DMBIN_* constants
DC_NUPSequence of ints containing supported logical page per physical page settings
DC_MEDIATYPESSequence of ints, DMMEDIA_* constants
DC_PAPERNAMESSequence of strings
DC_MEDIATYPENAMESSequence of strings
DC_MEDIAREADYSequence of strings
DC_FILEDEPENDENCIESSequence of strings
DC_PERSONALITYSequence of strings
DC_BINNAMESSequence of strings
DC_PAPERSIZESequence of dicts containing paper sizes, in 1/10 millimeter units
All othersOutput is an int