【发布时间】:2015-03-11 00:07:23
【问题描述】:
基本上,我的 docx 非常大,里面有很多图片,我想减小它的大小,我尝试了所有方法,压缩了图片等等,所以从 25MB 到 13MB。但是我想进一步降低它,所以我在玩,我将 docx 扩展名的名称更改为 zip 并提取它并查看文件的内容,查看图像,所以我将图像上传到我的虚拟主机和xml 文件,有一个文件正在调用图像。
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
-<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
<Relationship Target="media/image99.jpeg" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Id="rId117"/>
<Relationship Target="media/image273.png" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Id="rId299"/>
<Relationship Target="media/image13.png" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Id="rId21"/>
于是我把“目标”改成了我的站点,例如:
<Relationship Target="http://example.com/imagesfordoc/image13.png" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Id="rId21"/>
所以我确实使用替换功能更改了所有这些,它们与示例中的完全相似(显然具有不同的图像名称)。我删除了不需要的媒体文件夹,然后又将它的扩展名从 zip 更改为 docx,运行它,它给了我文件已损坏的错误,然后我单击确定,然后它要求我恢复,如果我单击“是”,它会按原样打开 Word 文档,但没有图像(只是之前设置了样式的文本)
图像已上传并在普通浏览器上完美打开,但是当我打开 docx 时。有错误!
知道如何实现这一点吗?
【问题讨论】: