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
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