RTFFormatProvider Import causing Stack Overflow

2 posts, 0 answers
  1. john
    john avatar
    1 posts
    Member since:
    Mar 2015

    Posted 24 Mar 2015 Link to this post

    Hello,  First I apologize if this is the wrong place for this question.  I'm new to using Telerik stuff and this is my first post.

    I am retrieving a RTF string from a legacy database and using RTFFormatProvider.Import loading it to a RadDocument.
    Occassionally I get an RTF string that causes the Import to Stack Overflow and I have no way to recover.  Ultimately the data needs to be converted to HTML for later viewing.

    I'm using Visual Studio 2013, The .net40 Telerik version I have is 2012.2.0725.40 (which I understand is not the most current).
    I can provide an rtf file that contains the data that causes the crash.  Hopefully someone can help me out.
    Just wondering if this is a known potential issue or it's a version issue for me?

    The conversion works the majority of the time.

    My code looks something like this:

    using Telerik.Windows.Documents.FormatProviders.Html;
    using Telerik.Windows.Documents.FormatProviders.Rtf;
    using Telerik.Windows.Documents.Model;

    namespace Conversion
    {
        public class RTFConversion
        {
            public string ConvertRTF(string rtfText)
            {
                RtfFormatProvider rftFormatProvider = new RtfFormatProvider();
                HtmlFormatProvider htmlFormatProvider = new HtmlFormatProvider();

                RadDocument radDocument = rftFormatProvider.Import(rtfText);
                return htmlFormatProvider.Export(radDocument);
            }
        }
    }

    Thanks in advance for any help.

    John
  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 25 Mar 2015 Link to this post

    Hi John,

    Could you provide us with one of the files that causes this, please? It's hard to say what might be causing this based on the information you've shared so far. You could also try showing the file with the latest version of the control to see if this is resolved. Try the WPF demos or the Silverlight ones, since the code base of RadRichTextBox is shared between the suites.

    Looking forward to your reply.

    Regards,
    Petya
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top