开发者

Read a RTF File and Remove the dynamic text

开发者 https://www.devze.com 2023-01-27 06:38 出处:网络
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\\f

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\f开发者_JAVA百科prq2\fcharset0 Times New Roman;}}

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消