通过优化其结构以编程方式缩小 Word 文档
我们使用 .NET 和第 3 方工具 (Spire.doc) 来呈现邮件合并文档,但它们往往相当大,例如 50-200 MB(将数据源和模板分开可以完成这项工作,但生成呈现的版本包含数百个页面,可以在单个文档中下载是客户的请求)。
是否有一个(.NET 可访问的)库,可以不是通过在文件(zip、rar 等)上使用压缩算法来最小化 Word 文档的大小,而是通过分析文档来实现结构然后在内部优化它从而使其更小?因此结果是有效的 Word doc(x)(而不是存档或 RTF 文档)。
优化嵌入图像并没有太大帮助,因为没有任何图像。
We are using .NET and a 3rd party tool (Spire.doc) to render mail merge documents, but they tend to be rather big, like 50-200 MB (keeping the data source and the template separate would do the job, but producing rendered versions with hundreds of pages to download in a single doc is the customer request).
Is there a (.NET accessible) library that minimizes the size of a Word document not by using a compression algorithm on the file (zip, rar,..), but by analysing the document structure and then optimizing it internally and thus making it smaller? So that the result is a valid Word doc(x) (and not an archive or a RTF document).
Optimizing embedded images doesn't help too much because there aren't any.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您认为合并功能添加了额外的空间,您可以进行合并,然后创建另一个文档,从合并的文档中复制文本并粘贴到另一个文档中。不过,我不确定为什么邮件合并会增加大量空间,除非它将所有连接详细信息存储在 .doc 文件中。
If you think it's the merge function adding extra space, you could do your merge and then create another doc copying the text from the merged doc and pasting into the other one. I'm not sure why a mail merge would add a bunch of space, though, unless it's storing all the connection details in the .doc file.
经过大量研究后,我们发现的唯一工具是商业工具:http://www .balesio.com/fileminimizersdk/eng/index.php。他们的网站上甚至没有价格,也没有演示版本,所以我不能说什么。
After doing lots of research, the only tool we found was a commercial one: http://www.balesio.com/fileminimizersdk/eng/index.php. They don't even have prices on their website, nor demo versions, so I can't say anything about it.