Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, May 2007
How to print a ".rtf " file


Message 1 in thread

could any one help me in reading a .rtf file and
printing it or showing it in QTextEdit or QTextBrowser?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
 [ signature omitted ] 

Message 2 in thread

"rajeev unnithan" <unnithanrajeev@xxxxxxxxx> wrote in message 
news:454679.8008.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> could any one help me in reading a .rtf file and
> printing it or showing it in QTextEdit or QTextBrowser?

The easy way: load it into Word, save it as HTML, and load the HTML file 
into QText*.

The not-so-easy way: write a rtf parser and populate a QTextDocument with 
the respective objects.


Volker



--
 [ signature omitted ] 

Message 3 in thread

There's a program called UnRTF which converts RTF files to HTML,
LaTeX, PostScript, and other formats. You could rip apart the program
source code to implement your conversions of RTF to HTML etc. or you
could call this program from within your Qt code and be on your way

UnRTF: http://www.gnu.org/software/unrtf/unrtf.html

Hope this helps
Benjamin Lau

--
 [ signature omitted ]