javascript - officeJS Word 加载项加载带有图像的页脚
问题描述
我们正在尝试以编程方式从 ooxml 文本加载页脚/页眉。当我们在页脚/页眉中有图像时,就会出现问题。我们正在使用
item.getFooter("primary").insertOoxml(ooxml, "replace");
我们如何通过使用 javascript API 以编程方式在文档中创建图像关系 r:Id?
或者也许还有另一种在标题中设置图像的方法......
下面是我们从标头中获取的 xml:
<?xml version="1.0" encoding="UTF-8"?>
<w:p xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
<w:pPr>
<w:rPr>
<w:sz w:val="22" />
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:sz w:val="22" />
</w:rPr>
<w:pict>
<v:shape xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" id="Picture 1" style="height:40.85pt;visibility:visible;width:40.85pt" o:spid="_x0000_i2049" filled="t" stroked="f" type="#_x0000_t75">
<v:imagedata xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" o:title="" r:id="rId1" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shape>
</w:pict>
</w:r>
</w:p>
解决方案
推荐阅读
- html - html页面很长
- wordpress - 如何从我的 Laravel 应用程序中提取刀片视图并通过我的 WordPress 应用程序显示它们?
- ruby-on-rails - Rails 简单表单检查错误“null”对于类型推断来说太大了
- python - Python 自动化测试:ImportError: liblapack.so.3gf
- sql - 用另一个表 sql 替换列
- javascript - 这个内存泄漏是怎么造成的?
- scala - Scala XML 文字 - 布尔值与字符串
- json - Swift 4 JSON 解析(预期解码数组
但找到了一本字典) - javascript - 将数据从一个渲染的模板复制到一个新的模态中
- c++ - 如何创建与 OpenSSL C++ 输出相比的 OpenSSL 输出以生成单元测试?