繁体   English   中英

如果我具有Base64编码的字符串,如何使用DocumentFormat.OpenXML将图像绘制到MS Word文档中?

[英]How to paint image into MS Word document using DocumentFormat.OpenXML if I have a Base64 encoded string?

我有一个Base64编码的字符串,我希望将其转换为图像并使用DocumentFormat.openXML在Word文档中进行绘制

作为常规的二进制图像。 要获取字节,请使用Convert.FromBase64String(theBase64string) ;对于流,请使用MemoryStream

using(var m = new MemoryStream(Convert.FromBase64String(theBase64string)))
{
    //here, same code to insert regular binary images
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM