[Pygui] Printing coordinate system problem

Vernon Cole vernondcole at gmail.com
Mon Dec 14 15:03:16 CET 2009


In searching for documentation, remember a quirk in Microsoft vocabulary...
a "printer" is software, not hardware.  The device on the corner of your
desk with the paper in it is not a "printer", it is a "printing device."
--
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.
My reasoning hinges on a bad experience I had in the past...
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's PC (of course). I had to re-design
the report a few pixels narrower.
--
Please somebody tell Greg that I'm wrong.
--
Vernon


On Mon, Dec 14, 2009 at 3:51 AM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:

> I'm wrestling with printing support for PyGUI on Windows.
> I'd like to set up the coordinate system during printing
> so that (0, 0) is at the corner of the paper, so that I
> can arrange for the margins to have predictable sizes.
>
> However, the device context I get from calling PrintDlg()
> seems to be set up so that the origin is at the corner
> of the printable area of the page, which is smaller by
> some amount that depends on the printer being used.
>
> If I could find out the limits of the printable area,
> I could correct for this, but there doesn't seem to be
> any straightforward way of getting this information.
> It doesn't seem to appear anywhere in any of the
> structs returned by PrintDlg(), and I can't find any
> call that might extract it from the device context.
>
> Am I missing something? Surely this an issue that most
> applications that print have to deal with. How do they
> do it?
>
> --
> Greg
> _______________________________________________
> Pygui mailing list
> Pygui at python.org
> http://mail.python.org/mailman/listinfo/pygui
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pygui/attachments/20091214/78cca729/attachment.htm>


More information about the Pygui mailing list