In searching for documentation, remember a quirk in Microsoft vocabulary... a &quot;printer&quot; is software, not hardware.  The device on the corner of your desk with the paper in it is not a &quot;printer&quot;, it is a &quot;printing device.&quot;<br>

--<br>Not being an expert on writing Windows printer code, nevertheless let me venture a guess that there may be no way to do what you want.<br>My reasoning hinges on a bad experience I had in the past...<br>Using Crystal Reports, a rather expensive commercial product which uses Windows very well, I designed a very fancy Purchase Order form, which I tested on three or four different Windows printers.  When I installed the application, the purchase orders would not print out correctly on another printer -- the one connected to my boss&#39;s PC (of course). I had to re-design the report a few pixels narrower.<br>

--<br>Please somebody tell Greg that I&#39;m wrong.<br>--<br>Vernon<br><br><br><div class="gmail_quote">On Mon, Dec 14, 2009 at 3:51 AM, Greg Ewing <span dir="ltr">&lt;<a href="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;m wrestling with printing support for PyGUI on Windows.<br>
I&#39;d like to set up the coordinate system during printing<br>
so that (0, 0) is at the corner of the paper, so that I<br>
can arrange for the margins to have predictable sizes.<br>
<br>
However, the device context I get from calling PrintDlg()<br>
seems to be set up so that the origin is at the corner<br>
of the printable area of the page, which is smaller by<br>
some amount that depends on the printer being used.<br>
<br>
If I could find out the limits of the printable area,<br>
I could correct for this, but there doesn&#39;t seem to be<br>
any straightforward way of getting this information.<br>
It doesn&#39;t seem to appear anywhere in any of the<br>
structs returned by PrintDlg(), and I can&#39;t find any<br>
call that might extract it from the device context.<br>
<br>
Am I missing something? Surely this an issue that most<br>
applications that print have to deal with. How do they<br>
do it?<br><font color="#888888">
<br>
-- <br>
Greg<br>
_______________________________________________<br>
Pygui mailing list<br>
<a href="mailto:Pygui@python.org" target="_blank">Pygui@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/pygui" target="_blank">http://mail.python.org/mailman/listinfo/pygui</a><br>
</font></blockquote></div><br>