After experiment with several options, I "discovered" one that works the
way I want (actually just altered a bit Tim Golden's code). It is a
workaround, but do the job nicely.

import win32ui
VALUE = 100
X=50; Y=50
my_multiline_string = string.split()
hDC = win32ui.CreateDC ()
hDC.CreatePrinterDC (my_printer_name)
hDC.StartDoc (my_doc_name)
hDC.StartPage ()
for line in my_multiline_string:
      hDC.TextOut (x, y, line)

      y += VALUE

hDC.EndPage ()
hDC.EndDoc ()

Here is the documentation for the DC
handler<http://timgolden.me.uk/pywin32-docs/PyCDC.html>and for the
Textout <http://timgolden.me.uk/pywin32-docs/PyCDC__TextOut_meth.html>method.

Thanks again for the help!
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to