I have a network printer. the default paper size is A4. I have tried 2 ways to change the paper size:
1) p = win32print.OpenPrinter(dp) t = win32print.GetPrinter(p, 2) t['pDevMode'].FormName=u'a3' win32print.SetPrinter(p, 2, t, 0) these code cause error refuse access, which maybe because of it's network printer 2) I get a DEVMODE (dmo) struct by calling win32print.DocumentProperties(0, p, dp, dmo, dmo, win32con.DM_IN_BUFFER|win32con.DM_OUT_BUFFER), but I have no idea to apply the DEVMODE to my DC. ( use resetDC()? it seems that no resetDC in python) anybody can give me some hint or sample code? thanks a lot. McPacino
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32