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



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

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

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

相关内容

最新更新