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

RTF Conversion Sample

3 Answers 177 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Thomas Kelley
Top achievements
Rank 1
Thomas Kelley asked on 24 Aug 2011, 10:31 PM
We need the RTF conversion capability for our Telerik products.  However, there is definitely some problems with handilng multiple font styles within the same document.  To reproduce, use the link to your demo, http://demos.telerik.com/aspnet-ajax/editor/examples/rtfexport/defaultcs.aspx

Highlight the middle paragraph, then change the font to something other than Times New Roman (like MS Sans Serif).  When you select the 'Export RadEditor content to RTF' button, the resulting file still shows Times New Roman for all paragraphs.  Thinking it was not using the data in the control, I even added some custom text.  The new text showed in the output file, but the font still went back to Times New Roman.

Any ideas on this? 

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 26 Aug 2011, 11:29 AM
Hello Thomas,

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/recipes/RtfConverter.aspx.
As you can see both libraries are written by different developers and they are not fully compatible with each other.

For your convenience I prepared a list of know limitations of the Import and Export features of both libraries:

RFT to HTML (Import)

bold
- supported. I was able to export bold formatting from the provided by you Bold.rtf file.
italic - supported
underline - supported
foreground and background colors - supported
table elements - unsupported
images- unsupported
indentations - 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

The unsupported scenarios are hard for development and require more time for implementations and testing. Our development is concentrated currently on producing valid XHTML content and the import and export problems are logged with medium priority in our ToDo list. That is why we could not provide firm estimate for when the unsupported features will be available.

Please note that good RTF import and export tools are very expensive. If you are currently unsatisfied with the offered by RadEditor RTF functionality, you could search in Internet for another free or paid RTF to HTML importation and HTML to RTF exportation tools and we will help you to integrate them with RadEditor.

Best regards,
Rumen
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Thomas Kelley
Top achievements
Rank 1
answered on 26 Aug 2011, 11:41 AM
Thank you for the reply.  However, the two links regarding the conversion libraries you provided are the same.  If Telerik is going to include this capability, don't you think they would want to ensure it provides a sufficient level of functionality to be considered feature complete.
0
Rumen
Telerik team
answered on 26 Aug 2011, 03:04 PM
Here is the link to the XHTML to RTF export: http://www.codeproject.com/KB/HTML/XHTML2RTF.aspx

The RTF support is indeed basic but RadEditor is an XHTML editor, but not a PDF or RTF editor and its main goal is to produce and export valid XHTML. That is why the improvement of the RTF support is logged with medium priority in our ToDo list.

Best regards,
Rumen
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Editor
Asked by
Thomas Kelley
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Thomas Kelley
Top achievements
Rank 1
Share this question
or