将RTF转换为HTML文本 [英] convert RTF to HTML text

查看:97
本文介绍了将RTF转换为HTML文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Experts,

我使用HTML编辑器将一些信息存储在数据库中。检索那些在HTML编辑器中显示的数据时,它是正确的。但是在创建pdf报告时,它将以相同的RTF格式出现。那么如何在报告中将上述RTF格式的文本显示为简单的ahtml文本。

请给我一些答案。

谢谢。



示例:

pdf报告显示< dh1 styled =text-align:center>< dstrong> TRUS BIOPSY,其中包含一些html标签PDF报告...



而不是

TRUS BIOPSY

解决方案

您好,



这是一个示例(在RTF和HTML之间转换 [ ^ ])



问候,

请参阅:

HTTP://www.codeguru。 com / cpp / controls / richedit / conversions / article.php / c5377 / RTFtoHTML-Converter.htm [ ^ ]

编写自己的RTF转换器 [ ^ ]


此解决方案基于C#Word组件。本文介绍了详情 -

[删除垃圾邮件链接]

文档文档= 文档(); 
document.LoadFromFile( @ .. \..\Sample.rtf );
document.SaveToFile( Sample.html,FileFormat.Html);


Hello Experts,
I am using a HTML Editor to store some information in database. While retrieving those data an displaying in that HTML Editor, it is coming correct. But while creating pdf reports on that, it is coming as same RTF format. So how can I show the above RTF formatted text as simple ahtml text in the report.
Please suggest me some answers.
Thank you.

example:
pdf report is displaying "<dh1 styled="text-align: center"><dstrong>TRUS BIOPSY" with some html tags in the PDF report...

instead of "

TRUS BIOPSY

"

解决方案

Hello,

Here is a sample (Converting between RTF and HTML[^])

Regards,


See this:
http://www.codeguru.com/cpp/controls/richedit/conversions/article.php/c5377/RTFtoHTML-Converter.htm[^]
Writing Your Own RTF Converter[^]


hi, this solution is based on C# Word component.This article presents the details-
[Spam link removed]

Document document = new Document();
document.LoadFromFile(@"..\..\Sample.rtf");
document.SaveToFile("Sample.html", FileFormat.Html);


这篇关于将RTF转换为HTML文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆