HTML转换为Doc(Word)或RTF格式 [英] Html To Doc(Word) Or RTF Format

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

问题描述

将html页面(带有CSS,表格,图像等)转换为word或rtf格式的最佳方法是什么?我已经知道有关添加

What would the best possible way to convert a html page (with css, tables, images etc.) to be converted to word or rtf format. I already know about adding the

content-type = application/word 

页眉,这不是一种选择,因为我们需要在文档中嵌入图像,以便在没有活动的Internet连接的情况下也可以查看它.

header and that's not an option because we need the images embedded in the document so that it can be viewed without an active internet connection.

我需要一个免费的(最好是)或商业的.NET库或一个命令行实用程序,因为我需要在共享服务器上的托管ASP.NET应用程序上执行此操作:|.

I need either a free (preferably) or commercial .NET library or a command line utility as I need to do this on a hosted ASP.NET application on a shared server :|.

推荐答案

如果使用的是Word 2003或2007,则可以使用xslt将xhtml文档转换为Word Xml文档.如果您通过Google搜索

If you are using Word 2003 or 2007 you can convert xhtml documents to Word Xml documents using xslt. If you google for html to docx xsl you will find many examples of the opposite (converting docx to html) so you might one of those examples as a basis for a conversion. The only challenge would be downloading and embedding the images in the document, but that is also possible.

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

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