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