<div dir="ltr">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.<div style><br></div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">import win32ui<br>VALUE = 100<br>X=50; Y=50<br>my_multiline_string = string.split()<br>hDC = win32ui.CreateDC ()<br>hDC.CreatePrinterDC (my_printer_name)<br>
hDC.StartDoc (my_doc_name)<br>hDC.StartPage ()<br>for line in my_multiline_string:<div style> hDC.TextOut (x, y, line)</div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div style>
y += VALUE</div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div style>hDC.EndPage ()</div><div style>hDC.EndDoc ()</div><div style><br></div></blockquote><div style>Here is the documentation for the<a href="http://timgolden.me.uk/pywin32-docs/PyCDC.html"> DC handler</a> and for the <a href="http://timgolden.me.uk/pywin32-docs/PyCDC__TextOut_meth.html">Textout</a> method.</div>
<div><br></div>Thanks again for the help! </div>