如何将HTML文件转换为文字? [英] How to convert HTML file to word?
问题描述
任何人都可以给我一些关闭和打开的链接。
我有一个要求,我需要将HTML文档作为Word .DOC文件保存在内存中。我可以使用的源库来做到这一点?
另外,我应该编辑这个问题来添加我使用的语言,以缩小选择范围。 p>
谢谢!
尝试使用 pandoc
pandoc -f html -t docx -o output.docx input.html
如果未明确指定输入或输出格式,则pandoc将尝试从输入和输出文件名的扩展名中猜测它。
- pandoc手册
所以你甚至可以使用
pandoc -o输出.docx input.html
I've got a requirement where I need to save HTML documents in memory as Word .DOC files.
Can anybody give me some links to both closed and open source libraries that I can use to do this?
Also, I should edit this question to add the language I'm using in order to narrow down the choices.
Thanks!
Try using pandoc
pandoc -f html -t docx -o output.docx input.html
If the input or output format is not specified explicitly, pandoc will attempt to guess it from the extensions of the input and output filenames.
— pandoc manual
So you can even use
pandoc -o output.docx input.html
这篇关于如何将HTML文件转换为文字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!