[Tutor] Printing txt files in landscape from python
Tim Golden
mail at timgolden.me.uk
Thu Feb 1 18:13:20 CET 2007
> Hi All,
>
> do you have any idea, how I can send a txt file to the default printer in
> landscape view with python on windows.
> I wanted to set up just the char size and the orientation of the printout.
>
> thinking about
> os.system('notepad.exe /pt "%%%s"' % filename)
Doesn't completely answer your question, but
have a look at this:
http://timgolden.me.uk/python/win32_how_do_i/print.html
and perhaps consider a ReportLab solution. It's ridiculously
difficult to set up the printing params construct under
Windows (just search for DEVMODE) so might well be easier
to use a PDF approach.
TJG
More information about the Tutor
mailing list