Printing plain text with exact positioning on Windows

KvS keesvanschaik at gmail.com
Tue Jan 5 11:34:20 EST 2010


On Jan 5, 12:56 pm, Chris Gonnerman
<chris.gonner... at newcenturycomputers.net> wrote:
> KvS wrote:
> > ... can I adjust the options normally appearing in
> > the Printing Dialog through Python?
>
> Yes, if you use my method or my module, as I gave in my previous post.  
> If you use Adobe Reader to print, I'm not sure how to automate the print
> settings.

Ok, actually I quite like being able to print straightforward through
your code, i.e. without any extra modules installed. I understand that
sending text to the printer is in principle as simple as

dc.TextOut(scale_factor * 72,
    -1 * scale_factor * 72,
    "Testing...")

I didn't see you do anything with adjusting margins in the code. Does
that mean that if I would e.g. do

dc.TextOut(0,
    0,
    "Testing...")

the printout would appear in the upper left corner of the paper, as
close to the edges as the printer is capable of? (Sorry, but I only
have Ubuntu available at the moment, no Windows).



More information about the Python-list mailing list