Alle 19:54, mercoledì 22 marzo 2006, Tomas Brabenec ha scritto:
i have simply Windows text editor with wxTextCtrl. I need print text
from TextCtrl to my printer.
How can I do? I cannot use HtmlEasyPrinting (text formating - spaces,
end of lines, ...).
Example at wiki.wxpython.org is very complicated. I'm looking for
elementary example (no complicated settings printer or page, only simple
print).
Do you have some example or tutorial of print text from wxPython ?
Hi again,
IMHO printing on Windows is hard task
<preamble>
A bit of history. I abandoned Windows and DOS years ago and
in present time I must port un app (GUI for database)
to Windows XP. I forgot all my experiences in Widows&DOS
ambient, so please don't laugh on me for 'simil newbie'
questions/suggestions.
</preamble>
In my app (developed on Linux) I adopted a bit complicated system
of printed output in concordance with Unix philosophy
'one small prg do one thing good and complicated task
is done concatenating a few of that little programs'.
My printed outputs system works in this way:
Main apps writes output data in tmp file with appropriated
laTeX tags, then concatenate this tmp file with fix header
and footer template files (laTeX preamble and other static stuff)
calling cat(1) comand. Result of this is laTeX source file;
another call os.system('pdflatex <source.tex>') and I'll
get nice formated .pdf file ready for printing.
The rest is easy - os.system('lpr -P<printer> <file.pdf>')
Obviously with final cleaning, calling system comand
rm -f <all used tmp files>.
I'm happy with it, it works fine on Linux box.
On Windows cat f1 f2 f3 > f4 == copy /A f1+f2+f3 f4;
rm -f == del /F /Q; call to pdflatex is the same,
but what about 'lpr'?
Comand 'print /D:<printer> <file>' prints only text files,
according with it's doc.
Question: how to print .pdf file in Win XP batch mode?
My partial answer: Maybe it's possible with 3rd part program.
I found some of these googling last night, I must
downloat them and try.
AFAIK Windows has not complete printing system as Unix CUPS.
I don't assured with pdf files, but construction "echo 'sample text'>prn",
where prn - dos name of printer working with plain text. Naked windows don't
support pdf, because you don't find a simply solution:(
···
-----Original Message-----
From: Pietro [mailto:bpietro53@libero.it]
Sent: Thursday, March 23, 2006 7:03 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Print text from TextCtrl
Alle 19:54, mercoledì 22 marzo 2006, Tomas Brabenec ha scritto:
i have simply Windows text editor with wxTextCtrl. I need print text
from TextCtrl to my printer.
How can I do? I cannot use HtmlEasyPrinting (text formating - spaces,
end of lines, ...).
Example at wiki.wxpython.org is very complicated. I'm looking for
elementary example (no complicated settings printer or page, only simple
print).
Do you have some example or tutorial of print text from wxPython ?
Hi again,
IMHO printing on Windows is hard task
<preamble>
A bit of history. I abandoned Windows and DOS years ago and
in present time I must port un app (GUI for database)
to Windows XP. I forgot all my experiences in Widows&DOS
ambient, so please don't laugh on me for 'simil newbie'
questions/suggestions.
</preamble>
In my app (developed on Linux) I adopted a bit complicated system
of printed output in concordance with Unix philosophy
'one small prg do one thing good and complicated task
is done concatenating a few of that little programs'.
My printed outputs system works in this way:
Main apps writes output data in tmp file with appropriated
laTeX tags, then concatenate this tmp file with fix header
and footer template files (laTeX preamble and other static stuff)
calling cat(1) comand. Result of this is laTeX source file;
another call os.system('pdflatex <source.tex>') and I'll
get nice formated .pdf file ready for printing.
The rest is easy - os.system('lpr -P<printer> <file.pdf>')
Obviously with final cleaning, calling system comand
rm -f <all used tmp files>.
I'm happy with it, it works fine on Linux box.
On Windows cat f1 f2 f3 > f4 == copy /A f1+f2+f3 f4;
rm -f == del /F /Q; call to pdflatex is the same,
but what about 'lpr'?
Comand 'print /D:<printer> <file>' prints only text files,
according with it's doc.
Question: how to print .pdf file in Win XP batch mode?
My partial answer: Maybe it's possible with 3rd part program.
I found some of these googling last night, I must
downloat them and try.
AFAIK Windows has not complete printing system as Unix CUPS.
Just my 5 cents.
Regards
Pietro
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org