Rich Text Component and RTF file

Stimulsoft Reports.NET discussion
Post Reply
yoyo
Posts: 15
Joined: Tue Dec 13, 2011 9:58 am
Location: Bratislava

Rich Text Component and RTF file

Post by yoyo »

Hello.

I recently wrote about HTML styles problem. You can see to http://forum.stimulsoft.com/Default.aspx?g=posts&t=5815

I need some HTML tags and styles, which are not supported in Stimulsoft.
I have idea, how I can do, what I need with using of Rich Text Component and conversion from HTML to RTF. At first I convert my HTML to RTF and after that I want to load RTF file source code in Rich Text Component. If I have physically on the disk drive it is possible open RTF file with Rich Text Component. But how I can show RTF code in Rich Text Box without saving to disk. I thing, with using of some stream or something else. Can I do this in code, assign RTF code from e.g from XML elemtnt to Rich Text Component?

Or have you some other ideas how to do this? It is very important for me.

Attachments
1691.test.txt
(35.11 KiB) Downloaded 275 times
1690.test.rtf
(35.11 KiB) Downloaded 282 times
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Rich Text Component and RTF file

Post by Ivan »

Hello,

You can use script in the GetValue event of the RichText component, for example:

Code: Select all

string st = System.IO.File.ReadAllText(@"d:\test.txt");
e.Value = StiRichText.PackRtf(st);
Thank you.
Attachments
1695.Report.zip
(1.42 KiB) Downloaded 401 times
yoyo
Posts: 15
Joined: Tue Dec 13, 2011 9:58 am
Location: Bratislava

Rich Text Component and RTF file

Post by yoyo »

Thank you. It works.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Rich Text Component and RTF file

Post by Alex K. »

Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.
Post Reply