PyDEVMODE Object

Python object wrapping a DEVMODE structure

Methods

Clear
Resets all members of the structure 

Properties

int SpecVersion
Should always be set to DM_SPECVERSION

int DriverVersion
Version nbr assigned to printer driver by vendor

int Size
Size of structure

int DriverExtra
Number of extra bytes allocated for driver data, can only be set when new object is created

int Fields
Bitmask of win32con.DM_* constants indicating which members are set

int Orientation
Only applies to printers, DMORIENT_PORTRAIT or DMORIENT_LANDSCAPE

int PaperSize
Use 0 if PaperWidth and PaperLength are set, otherwise win32con.DMPAPER_* constant

int PaperLength
Specified in 1/10 millimeters

int PaperWidth
Specified in 1/10 millimeters

int Position_x
Position of display relative to desktop

int Position_y
Position of display relative to desktop

int DisplayOrientation
Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270

int DisplayFixedOutput
DMDFO_DEFAULT, DMDFO_CENTER, DMDFO_STRETCH

int Scale
Specified as percentage, eg 50 means half size of original

int Copies
Nbr of copies to print

int DefaultSource
DMBIN_* constant, or can be a printer-specific value

int PrintQuality
DMRES_* constant, interpreted as DPI if positive

int Color
DMCOLOR_COLOR or DMCOLOR_MONOCHROME

int Duplex
For printers that do two-sided printing: DMDUP_SIMPLEX, DMDUP_HORIZONTAL, DMDUP_VERTICAL

int YResolution
Vertical printer resolution in DPI - if this is set, PrintQuality indicates horizontal DPI

int TTOption
TrueType options: DMTT_BITMAP, DMTT_DOWNLOAD, DMTT_DOWNLOAD_OUTLINE, DMTT_SUBDEV

int Collate
DMCOLLATE_TRUE or DMCOLLATE_FALSE

int LogPixels
Pixels per inch (only for display devices

int BitsPerPel
Color resolution in bits per pixel

int PelsWidth
Pixel width of display

int PelsHeight
Pixel height of display

int DisplayFlags
Combination of DM_GRAYSCALE and DM_INTERLACED

int DisplayFrequency
Refresh rate

int DisplayOrientation
Display rotation: DMDO_DEFAULT,DMDO_90, DMDO_180, DMDO_270

int ICMMethod
Indicates where ICM is performed, one of win32con.DMICMMETHOD_* values

int ICMIntent
Intent of ICM, one of win32con.DMICM_* values

int MediaType
win32con.DMMEDIA_*, can also be a printer-specific value greater then DMMEDIA_USER

int DitherType
Dithering option, win32con.DMDITHER_*

int Reserved1
Reserved, use only 0

int Reserved2
Reserved, use only 0

int Nup
Controls printing of multiple logical pages per physical page, DMNUP_SYSTEM or DMNUP_ONEUP

int PanningWidth
Not used, leave as 0

int PanningHeight
Not used, leave as 0

str DeviceName
String of at most 32 chars

str FormName
Name of form as returned by win32print::EnumForms, at most 32 chars

str DriverData
Driver data appended to end of structure