0
votes

My RTF File contains a text in the beginning like below:

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Trebuchet MS;}{\f1\fswiss\fprq2\fcharset0 Verdana;}{\f2\fnil\fcharset0 Tahoma;}{\f3\fnil\fcharset0 Arial;}{\f4\froman\fprq2\fcharset0 Times New Roman;}}

How can i Read the RTF File and replace with anything i wish?

1
The text that is generated contain font names and that is totally dynamic (i.e depending on user selection). Say instead it could be Arial, Verdana & Lucidia Handwriting. - xorpower

1 Answers

0
votes

If you want to generate the RTF Header yourself you should take a look at the RTF Spec. Otherwise you might be able to simply use the RichTextBox-Control, set the font-style/color etc. and get the header from the RTFText-Property.