convert rtf to html

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi, how can i convert rtf encoding to HTML? i looked at previous posts and i
cant seem to find the HTTPUtility in vbexpress 2005. Is it not there, and is
there another way? thanks
 
iwdu15 said:
hi, how can i convert rtf encoding to HTML? i looked at previous posts and
i
cant seem to find the HTTPUtility in vbexpress 2005. Is it not there, and
is
there another way? thanks

Not sure what you want to do here. HttpUtility is still around, it's part of
System.Web and it works at the character level, encoding and decoding
strings, for example coverting between html entities and spaces or extended
characters.

I'm not sure how useful it would be to convert an RTF with HtmlEncode. It
would mean that you could display the RTF code in HTML with all its codes
and control words, but it would not get you nicely formatted text.

If you want to convert RTF-formatted text to HTML-formatted text, there is
no simple way. There are fundamental differences between the formats that
make conversion problematic, though you can do a reasonable job. Try
searching for rtf2html or for "RTF to HTML". There are some samples around
but nothing built into .NET.

Another idea is to paste RTF code into the Webbrowser control and to read
back the HTML.

Tim
Read my tech blog:
http://www.itwriting.com/blog
 
hi, thanks for the ideas...im trying to create a messenger program using
Sockets and network streams to send rich text, so i might try just adding the
Rich Text send to the receiving computers RichTextBox.rtf
property...hopefully thatl work
 
Back
Top