Printing plain text with exact positioning on Windows

KvS keesvanschaik at
Tue Jan 5 00:50:16 CET 2010

Dear all,

for a python program running on Win XP that is used to produce
invoices I need to be able to have the printer print a page with just
plain text, but positioned (almost) exactly at prescribed places (due
to the use of 'pre formatted' invoice forms). In particular as close
to the left and right edges of the page as possible. So far I've been
using a combination of HTML & CSS, IE automation and fiddling in the
registry to set left and right printing margins of IE to 0 and back to
defaults after the printing is done.

This worked ok, but recently some problem occured that I wasn't able
to solve so far (seemingly random crashes, probably due to an update
to IE 8, I've posted about this problem before:
but unfortunately no answers).

So now I'm looking for other ways to get this printing job done. I
know of Tim Goldens page about Windows printing: and have been
googling a lot, but I'm still not convinced what the best way to go
is. E.g. I can't get clear whether the combination reportlab & Acrobat
Reader allows to print very close to the left and right edge of the
paper (without a user having to change something in a Print dialog

You would expect this is a relatively typical problem and others have
ran into it before me. Any thoughts on this?

Thanks in advance, Kees

More information about the Python-list mailing list