【问题标题】:convert doc to docx using soffice not working使用 soffice 将 doc 转换为 docx 不起作用
【发布时间】:2018-09-11 13:38:06
【问题描述】:

我正在尝试使用以下命令将 doc 转换为 docx:

soffice --headless --convert-to docx test.doc

我使用的是centos7,从openoffice到安装所有东西

yum install openoffice

我在 .doc 文件的当前目录中。

我遇到了与过滤器相关的错误(我搜索了这些过滤器,但没有找到可以解决我的问题的过滤器):

Error: no export filter for teste.docx found, aborting.
Error: no export filter

每次我放一些过滤器,它都会给我另一个错误:

Error: Please verify input parameters... (SfxBaseModel::impl_store <file:///path/test.txt> failed: 0x81a)

我放置了过滤器(来自 soffice 的过滤器示例),但仍然无法正常工作

soffice --headless --convert-to html:"txt:Text (encoded):UTF8"  --outdir /home/user/Downloads  /home/user/Downloads/test.doc 

【问题讨论】:

    标签: centos7 libreoffice soffice


    【解决方案1】:

    我发现它为什么不起作用。我卸载了oppenoffice 和libreoffice 并放了另一个。

    yum remove openoffice* libreoffice*
    yum install libreoffice*
    

    可能它缺少某些库或某些依赖项相互冲突。

    现在一切正常。

    soffice --headless --convert-to docx  teste.doc
    

    【讨论】:

    • 我收到错误消息:错误:找不到 C:\laragon\www\phpword\result\test.docx 的导出过滤器,正在中止。
    • @Gautier 有什么解决办法吗?
    • LibreOffice 7 的语法似乎是 --convert-to "docx:MS Word 2007 XML",在 docx 之后提供了输出过滤器名称。输出过滤器名称(“MS Word 2007 XML”)的选项似乎在这里:git.libreoffice.org/core/+/refs/heads/master/filter/source/…
    猜你喜欢
    • 2012-05-17
    • 1970-01-01
    • 1970-01-01
    • 2021-06-28
    • 2016-03-10
    • 2011-10-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多