Could you please tell me if there is a good free C++ class/library to convert RTF to HTML? Thank you!
Asked
Active
Viewed 2,945 times
1
-
What does this have to do with Microsoft Office? – Andrew Marshall Nov 20 '11 at 02:58
-
What do you mean, convert RTF to HTML? – Seth Carnegie Nov 20 '11 at 03:00
-
@SethCarnegie - RTF is a file format, HTML is a file format... so a class to convert one to the other – D.Shawley Nov 20 '11 at 03:03
-
possible duplicate of [Convert Rtf to HTML](http://stackoverflow.com/questions/439301/convert-rtf-to-html)... if you are using MFC, then C# is not really a stretch – D.Shawley Nov 20 '11 at 03:03
-
Have you looked into using wvWare? http://wvware.sourceforge.net – moshbear Nov 20 '11 at 03:13
-
I'm gonna try http://phvu.wordpress.com/2009/09/14/rtf-to-html-converter-in-c/ – Ștefan-Mihai MOGA Nov 20 '11 at 07:24
-
@AndrewMarshall: I thought there is a public interface/COM object in Office I could use. – Ștefan-Mihai MOGA Nov 20 '11 at 07:31
1 Answers
1
I would use Word Automation (i.e. integrate with Microsoft Office). Then, through the MS Word class, open the RTF, save it as HTML.
- Open rtf file.
- SaveAs using WdSaveFormat = wdFormatHTML
http://msdn.microsoft.com/en-US/library/microsoft.office.tools.word.document.saveas(v=VS.100).aspx

l33t
- 18,692
- 16
- 103
- 180
-
Thank you! But I was looking for something like http://sourceforge.net/projects/rtf2html-lite/ – Ștefan-Mihai MOGA Nov 27 '11 at 00:11