|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
RTF parsing class libraryI 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" <casey@MORE_spam_PLEASEbrains-N-brawn.com> wrote in Why don't you put the text into a RichTextBox, and use its methods to get news:OJkpcjG%23EHA.2032@tk2msftngp13.phx.gbl... >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? 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 cool idea, i'll try the RichTextBox.
but i think the latest spec is 1.8 http://www.microsoft.com/downloads/details.aspx?FamilyID=ac57de32-17f0-4b46-9e4e-467ef9bc5540&displaylang=en Thanks casey Show quote "Niki Estner" <niki.est***@cube.net> wrote in message news:%23$UeG9K%23EHA.2180@TK2MSFTNGP10.phx.gbl... > "casey chesnut" <casey@MORE_spam_PLEASEbrains-N-brawn.com> wrote in > news:OJkpcjG%23EHA.2032@tk2msftngp13.phx.gbl... >>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 > "casey chesnut" <casey@MORE_spam_PLEASEbrains-N-brawn.com> wrote in thanks! I'll update my links.news:OuMlqCL%23EHA.3708@TK2MSFTNGP14.phx.gbl... > cool idea, i'll try the RichTextBox. > > but i think the latest spec is 1.8 > http://www.microsoft.com/downloads/details.aspx?FamilyID=ac57de32-17f0-4b46-9e4e-467ef9bc5540&displaylang=en 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. Show quote "Niki Estner" wrote: > "casey chesnut" <casey@MORE_spam_PLEASEbrains-N-brawn.com> wrote in > news:OuMlqCL%23EHA.3708@TK2MSFTNGP14.phx.gbl... > > cool idea, i'll try the RichTextBox. > > > > but i think the latest spec is 1.8 > > http://www.microsoft.com/downloads/details.aspx?FamilyID=ac57de32-17f0-4b46-9e4e-467ef9bc5540&displaylang=en > > thanks! I'll update my links. > > Niki > > > |
|||||||||||||||||||||||