473,394 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

convert rtf to html

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
Jan 28 '06 #1
3 3359
"iwdu15" <jmmgoalsteratyahoodotcom> wrote in message
news:BF**********************************@microsof t.com...
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
Jan 30 '06 #2
Why don't you just open the file with MS Word and save it as HTML? :)

/Sofia

"Tim Anderson" <ti*****@nospam.nospam> wrote in message
news:O0*************@TK2MSFTNGP12.phx.gbl...
"iwdu15" <jmmgoalsteratyahoodotcom> wrote in message
news:BF**********************************@microsof t.com...
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

Jan 30 '06 #3
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
--
-iwdu15
Jan 30 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
Hi: I want to convert html to xml. I am doing this: from xml.dom.ext.reader import HtmlLib from xml.dom import ext, Node from xml.dom.NodeFilter import NodeFilter
1
by: Sebastien B. | last post by:
I'm looking for the best tool to convert 'every day' html into proper XHTML so that I can parse it as an XML document. So far I've been using Tidylib to do this, but it doesn't handle things as...
3
by: Andy Smith | last post by:
Hi, I need to convert HTML files to PDF using a .net component. I've seen components that do this but they all are either com wrappers on activex controls, or print to a 'Convert to PDF' printer. ...
0
by: avnrao | last post by:
I am looking for a best tool to convert html source to PDF. I am generating html from an xslt and want to convert it to pdf..i have evaluated ABDpdf and ActivePdf components. but not sure if these...
7
by: >>Shailesh | last post by:
CODE: $stuff = '<html><head><title>stuff</title></head><body><b>Hello</b> World</body></html>'; header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past...
0
by: Zhao Sheng | last post by:
http://www.guangmingsoft.com/htmltoimage/help.htm Html To Image Html To Image 2.0 Released! Html To Image help you convert html page from any URL to image or thumbnails easily and quickly. ...
6
by: PenguinPig | last post by:
Dear All Experts I would like to know how to convert a HTML into Image using C#. Or allow me contains HTML code (parsed) in Image? I also tried this way but it just display the character "<" &...
1
by: Alexander.Veit | last post by:
Hallo, does anyone know how to convert HTML Entities into UCS2-String (Value). For example: I need to convert Sułowska 43 (value in mysql database) to a unicode string with the specified...
5
by: Damiano | last post by:
Hello, How could i convert Html page in a PDF file? Is there a free library? Thanks
1
by: sharmajavaforum | last post by:
Hai, I have a small task. I have an .HTML file. I wanted to convert .HTML file into a plain .txt file. Means after i convert the file, the .txt file should contain only the text rather ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.