如何将base64 imgae作为HTML文本转换为win文件中的word文档? [英] How to convert base64 imgae as HTML text to word document in win forms?

查看:450
本文介绍了如何将base64 imgae作为HTML文本转换为win文件中的word文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将html内容转换为单词,所有文本都正确显示,但图片不会在word文档中呈现。



我尝试过:



I need to convert html content to word,all text display proper but image not render inside word document.

What I have tried:

For example :

<html>
<body>
<div>
<p>Taken from wikpedia</p>
<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
</div> 
</body>
</html>

推荐答案

似乎Word无法处理这类数据:请参阅答案:如何在HTML中生成Word中显示图像? - 堆栈溢出 [ ^ ]

但可能使用Office 365 Word 2016,请参见此示例:将base64编码图像插入Word 2016文档xomino到365 [ ^ ]
It seems Word can not handle this kind of data: see answer here: How to display images in Word generated from HTML? - Stack Overflow[^]
But it might be possible with Office 365 Word 2016, see example here: Inserting a base64 encoded image into a Word 2016 document | xomino to 365[^]


这篇关于如何将base64 imgae作为HTML文本转换为win文件中的word文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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