We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

HTML to RTF and RTF to HTML conversion

Hi,
I want component that convert should HTML to RTF and RTF to HTML.

In my application am using component to export pdf.
while exporting i need to convert some data from HTML string to RTF string and pass that to the export pdf component. Also need to convert RTF to HTML at some places.

Is DocIO component support conversion of HTML string to RTF string and RTF string to HTML string ?

I am not intrested in RTF<->HTML RTF file conversion.

Please suggest 

6 Replies

RA Rajendran Syncfusion Team April 5, 2013 11:18 AM UTC

Hi Amol,


Thank you for your patience.

 

We have prepared a simple sample to convert HTML string into RTF string (whole RTF document represented as text) and RTF string (whole RTF document) back to HTML. Please find the sample from below link. Kindly try this sample and let us know if you helps you.

 

Sample link:

http://www.syncfusion.com/downloads/Support/DirectTrac/106536/GenerateWord670646734.zip

 

Note: Here the converted RTF and HTML text represents the whole document structure and not just the part of the document as equivalent to given input text.

 

For more information on HTML and RTF conversion refer below UG documentation links:

Importing XHTML:

http://help.syncfusion.com/ug/asp.net/docio/default.htm#!documents/importingxhtml.htm

 

Importing RTF:

help.syncfusion.com/ug/asp.net/docio/default.htm#!documents/rtftodoc.htm

 

Please let us know if you have any questions.

 

Regards

Rajendran



JB Jimmy Blanquet October 14, 2014 09:27 AM UTC

Hi,

I have the same issue and i would like to acces to the sample code but I can't.
Can you give me acces to this code ?

Thx;


NB Nithya B Syncfusion Team October 15, 2014 09:29 AM UTC

Hi Jimmy,

 

We regret for the inconvenience caused.

We have prepared a sample to convert HTML string into RTF string (whole RTF document represented as text) and RTF string (whole RTF document represented as text) back to HTML. Please find the sample from below the link. Kindly try this sample and let us know if you helps you.

 

Sample link:

http://www.syncfusion.com/downloads/support/directtrac/general/Generate_Word-1609929255.zip

 

Note: Here the converted RTF and HTML text represents the whole document structure and not just the part of the document as equivalent to given input text.

 

 Please let us know if you have any questions.

 

Regards,

Nithya



YD Yen Dutt March 12, 2018 02:17 PM UTC

I am trying to evaluate this.. but when converting attached HTML, it gives wrong RTF. (Special Characters)
Attachment: html_631f2e28.zip


MJ Mohanaselvam Jothi Syncfusion Team March 13, 2018 04:43 PM UTC

Hi Yen,

Thank you for your update.

On further analyzing with the given input file, we have found that the given HTML text is in improper XHTML format and some tags are not closed properly. DocIO supports only well formatted XHTML content so, kindly provide us the valid HTML to reproduce the reported problem. Thereby we will analyze further and provide you the appropriate solution at the earliest.

Note:
If you have any confidential data in your HTML file, please replace with some dummy data and provide us the same. We just need your file to recreate the problem you face.

You can ensure at your end, whether the given HTML text is well formatted XHTML using IsValidXHTML API in DocIO.


Please let us know if you have any other questions.

Regards,
Mohanaselvam J
 



SS Sub Systems August 25, 2021 11:55 AM UTC

Thank you for your update on HTML - RTF Converter.



Loader.
Live Chat Icon For mobile
Up arrow icon