Q

Developing an RTF writer

I want to develop a small RTF writer in C#. Do you have any suggestions for how to get started?
I would suggest reading through the RTF specifications. The MSDN Library would be my first stop, refer to this link ms-help://MS.MSDNQTR.2003FEB.1033/Dnrtfspec/html/rtfspec.htm in the MSDN Library (you may need to change your filter in the help files to "No Filter" or "Platform SDK"). The RTF format is rather complex, but it is not all that complicated once you get your feet wet. Also do a Google search for RTF and C#, that should get you a load of good links. The CodeProject (http://www.codeproject.com) has several very good articles about using RTF in C#, so you might want to check them out also.

Once you get the format and specifications figured out, and know what you want to do. You could write a custom class, or inherit from one of the writer base classes in the .NET Framework. Look at the StreamWriter or TextWriter classes for more information. Creating a custom implementation using the RTF format from one of these classes would be a very robust mechanism for your goal.
This was first published in September 2004

Dig deeper on C# programming language

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close