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

How to display .rtf file(stream) content in RadEditor using LoadRtfContent() ?

1 Answer 201 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Purnasekhar
Top achievements
Rank 1
Purnasekhar asked on 21 Apr 2012, 12:33 PM
Hi All,

I trying to display.rtf file content in RadEditor using LoadRtfContent(stream) method.In rtf file contains tables & images,In radeditor, i am unable to display tables & images.Please give me any answer for my question.Please find the below code, i am using to display .rtf file data in radeditor.

Code:

    FileStream fstream = new FileStream("C:\\THTDocumentsUpload\\Resumes\\25\\78\\Test.rtf", FileMode.Open, FileAccess.ReadWrite);
            
    radDescription.LoadRtfContent(fstream);

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 23 Apr 2012, 12:02 PM
Hello,

RadEditor uses two different free libraries to provide Import to RTF and Export to RTF features.

The first one used to provide RFT to HTML importation is available in this CodeProject's article: http://www.codeproject.com/KB/recipes/RtfConverter.aspx.
The library used for HTML to RTF exportation is available here http://www.codeproject.com/KB/HTML/XHTML2RTF.aspx.
Both libraries are written by different developers and they are not fully compatible with each other.

You can find below a list of all know limitations of the Import and Export features of both libraries:

RFT to HTML (Import)

bold
- supported..
italic - supported
underline - supported
foreground and background colors - supported
table elements - unsupported
images- unsupported
indentations - unsupported
superscript and subscript - unsupported

HTML to RTF (export)


bold - supported.
italic - supported
underline - unsupported
foreground and background colors - unsupported
table elements - partially supported - table borders are not exported
images- unsupported
indentations - supported
font family and size - unsupported
superscript and subscript - unsupported

The issues are logged for fixing but our developers will be unable to fix them for the Q2 2012 release, because our ToDo list is already set. The priority of the issues are not high because the main purpose of RadEditor is to produce XHTML content, but not RTF, PDF or other types of content. In addition, the good export to RTF, PDF converters are very expensive.



Regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Ajax
Asked by
Purnasekhar
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or