开发者

RichTextFormat to HTML

I've taken a look at this thread开发者_开发百科 about converting RTF to HTML but some links are down or cost money.

What is the best way to convert RTF to HTML, it is just text (font size, bold, underline, color etc.) not images or anything else.

Any help would be greatly appreciated!


Just Google that dead link of DocFrac, it gives you the open source location on SourceForge and a download location at SoftPedia.

Seems pretty stable, but haven't tried it myself.

EDIT: It uses a COM DLL, or unmanaged DLL, so to speak. You can link that with ordinary P/Invoke calls, but if you have trouble setting it up, have a look at this post which shows how to do this for converting RTF to HTML with DoxLib. The DLLs are found in the *.gz file from SourceForge. There's even a VB6 example project, but that can only be run with a non-.NET version of VB.


The CopySourceAsHtml visual studio plugin (which is open source) does exactly that. Take a look at the sourcecode.


You can try the C# library from the article Writing Your Own RTF Converter which is free.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜