RTF parsing class library

  • Thread starter Thread starter casey chesnut
  • Start date Start date
C

casey chesnut

I have small snippets of RTF that i need to render in a new file format.
So from the RTF, i need Font (size, color, family) info,
and the text / hyperlink that needs to be displayed.

Is there an API that I can call to get this info?
Maybe some Managed library into Word or something else?
Maybe some call to convert it to the Word XML format?
And the last ditch effort would be to parse it myself ...

Thanks,
casey
http://www.brains-N-brawn.com
 
casey chesnut said:
I have small snippets of RTF that i need to render in a new file format.
So from the RTF, i need Font (size, color, family) info,
and the text / hyperlink that needs to be displayed.

Is there an API that I can call to get this info?
Maybe some Managed library into Word or something else?
Maybe some call to convert it to the Word XML format?

Why don't you put the text into a RichTextBox, and use its methods to get
the information you need?
And the last ditch effort would be to parse it myself ...

Fortunately it's well documented:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec.asp

Niki
 
We use the RichTextBox to render RTF to graphics. It works fine for simple
cases but it won't render complicated RTF genreated by MS Word, for example
tables.
 
Back
Top