如何用C#中的纯文本(或字符串)创建RTF? [英] How to create RTF from plain text (or string) in C#?
本文介绍了如何用C#中的纯文本(或字符串)创建RTF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以帮我从C#中的字符串创建RTF吗?
Could anyone please help me to create RTF from string in C#?
我将所有格式(粗体,斜体等)保存在自定义类中.
I save all the formats (bold, italic, etc) in a customized class.
杰里
推荐答案
我会使用外部库而不是自己编写代码.检查以下项目:
I'd use an external library instead of coding your own. Check these projects:
- http://sourceforge.net/projects/netrtfwriter/
- http://www.codeproject.com/Articles/11306/NRTFTree-A-class-library-for-RTF-processing-in-C
您也许还可以使用RichTextBox控件的Rtf属性(如果您的用户在此类控件中输入数据).
You might also be able to use the Rtf property of the RichTextBox control (if your users are entering data in such a control).
这篇关于如何用C#中的纯文本(或字符串)创建RTF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文