This is a migrated thread and some comments may be shown as answers.

How to Import a RTF String

2 Answers 45 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 14 Oct 2013, 01:31 PM
I am wondering if it is possible to import and translate an RTF string.  I will be getting a string like the one below from the database.  I want to be able to import the string and show the formatted document. Please let me know if I need to clarify this question.

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil Arial;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\sl240\slmult1\fs20 RE:\tab Patient: <#A:PATIENTNAME>\f1\par
\tab\f0 Account Number: <#A:ACCOUNTCODE>\f1\par
\par
\par
\f0 <#A:LETTERDATE>\f1\par
\par
\i\f0 Re: HIPAA Disclosure Authorization Form\f1\par
\par
\i0\f0 Dear <#A:PATIENTNAME>:\f1\par
\par
\f0 Document body goes here.\f1\par
\b\tab\b0\par
\par
\f0 More document info here\f1\par
\par
\f0 regards,\f1\par
\par
\b\par
\b0\f0 Patient Accounts\f1\par
\f0 555-555-5555\f1\par
}

2 Answers, 1 is accepted

Sort by
0
Accepted
Petya
Telerik team
answered on 15 Oct 2013, 03:54 PM
Hi,

Thank you for contacting us with this!

Please refer to this help article explaining format providers and how they can be used. In your case you can import the string with RtfFormatProvider and show the resulting document in RadRichTextBox.

I hope this helps!

Regards,
Petya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Nick
Top achievements
Rank 1
answered on 15 Oct 2013, 04:31 PM
Thanks for your response!  I was able to figure this one out.  I actually opened another post which is somewhat similar but not so basic.  Perhaps you have some insight on the export process?
http://www.telerik.com/community/forums/silverlight/richtextbox/returning-the-rtf-string.aspx
Tags
RichTextBox
Asked by
Nick
Top achievements
Rank 1
Answers by
Petya
Telerik team
Nick
Top achievements
Rank 1
Share this question
or