totravel / minidocx

Fast and easy to use C++ library that creates or modifies Microsoft Word files without installing Word.
MIT License
83 stars 26 forks source link

libreoffice 打开失败 #1

Closed hggq closed 2 years ago

hggq commented 2 years ago

想法不错,期待这个minidocx。 测试用例里面生成的docx文件,mac os 自带的pages打开没有问题,但是LibreOffice打开失败

希望有可能表格和图片功能

totravel commented 2 years ago

好的,我会看一下是什么问题导致 minidocx 生成的文档不能用 LibreOffice 打开。

minidocx 在不久的未来会支持插入表格和图片。

totravel commented 2 years ago

我在 Windows 上用 LibreOffice 7.2.7 可以打开 minidocx 生成的文档,包括所有示例生成的文档,但确实存在一些格式上的问题。你可以提供更多信息吗?

hggq commented 2 years ago

我是在mac os上不行,你可以试下linux 上

totravel commented 2 years ago

我在 Ubuntu 22.0.4 用 LibreOffice 7.3 也可以顺利打开 minidocx 生成的文档。

注意,Word 文档本质上是一个 .zip 文件。由于 zip0.2.2 开始强制启用包括 Microsoft Word 在内的大多数字处理软件都不支持的 Zip64 扩展,因此构建 minidocx 需要 0.2.1 及以下的 zip

hggq commented 2 years ago

确实,使用0.2.1 LibreOffice for Mac 可以打开