Harikrishna
Harikrishna

Reputation: 4305

Header in richtext format and manipulating the rtf file

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

Upvotes: 0

Views: 6846

Answers (2)

Mark Byers
Mark Byers

Reputation: 838186

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.

Upvotes: 1

Jon Skeet
Jon Skeet

Reputation: 1500495

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.

Upvotes: 1

Related Questions