Returning the rtf string

2 posts, 0 answers
  1. Nick
    Nick avatar
    3 posts
    Member since:
    Oct 2013

    Posted 15 Oct 2013 Link to this post

    Hello,

    Is it possible to return the Rtf code instead of saving a document when "exporting" the document from the RichTextBoxEditor?  In other words I need to return the Rtf code instead of saving the file.

    For example.  I want to open/edit a .Rtf document, when save is clicked I want to show the "Rtf code" in a text area.  My example of Rtf code is below.

    {\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. Svetoslav
    Admin
    Svetoslav avatar
    55 posts

    Posted 17 Oct 2013 Link to this post

    Hi Nick,

    Thank you for your question.

    You could achieve this goal using RtfFormatProvider to export your document to string as described here and import it back to RadRichTextBox. Another way to implement it is through RtfDataProvider as explained in this help article.

    Please, find attached a sample demo project showing both of the options above.

    I hope this information is helpful. Let us know if you need any further assistance.

    Regards,
    Svetoslav
    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 >>
  3. DevCraft banner
Back to Top