tags:

views:

99

answers:

2

What is header in richtextbox format?? And how can we manipulate the rtf file.

+1  A: 

See the v1.6 RTF specification, including the Header part.

Obviously this relates to your previous questions today: again, I suggest that instead of trying to have a single document with multiple sections, you create separate documents.

Jon Skeet
+1  A: 

To see how an RTF document looks in its raw form, save some text in an RTF-aware editor like wordpad, and then open it again in a plain text editor. For example, this RTF document:

Hello,
world!

becomes this when opened in plain text mode:

{\rtf1\ansi\ansicpg1252\deff0\deflang1030{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\f0\fs20 Hello,\par
\b world\b0 !\par
}

Notice that there is a lot more text in the raw version than is visible when opened in an RTF-aware editor. If you want to manipulate the RTF document using raw string operations, you have to be careful to preserve the structure of this document otherwise it may become unreadable. It would be better to use an RTF parser to modify the document to avoid accidentally breaking it.

Mark Byers