2

i am trying to convert a doc to docx using the following command:

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

I am using centos7, and install everything from openoffice throught

yum install openoffice

I am in the current directory of the .doc file.

I am having an error related to filters (I had search about these filters and didn't find one that would solve my problem):

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

Everytime i put some filter, it gives me another error:

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

I put the filter (filter example from soffice) and still not working

soffice --headless --convert-to html:"txt:Text (encoded):UTF8"  --outdir /home/user/Downloads  /home/user/Downloads/test.doc 
Luiza Rodrigues
  • 185
  • 1
  • 2
  • 15

1 Answers1

0

I discover why it's not working. I uninstall oppenoffice and libreoffice and put another one.

yum remove openoffice* libreoffice*
yum install libreoffice*

Probably it was missing some library or some dependencies were confliting.

Now everything is working.

soffice --headless --convert-to docx  teste.doc
Luiza Rodrigues
  • 185
  • 1
  • 2
  • 15
  • I have the error message : Error: no export filter for C:\laragon\www\phpword\result\test.docx found, aborting. – Gautier Oct 17 '19 at 10:10
  • @Gautier got any solution? – Yasar Arafath Mar 05 '20 at 12:51
  • Syntax for LibreOffice 7 seems to be `--convert-to "docx:MS Word 2007 XML"`, with an output filter name supplied after the docx. Options for the output filter name ("MS Word 2007 XML") seem to be here: https://git.libreoffice.org/core/+/refs/heads/master/filter/source/config/fragments/filters – Jack Cushman Nov 29 '21 at 17:18
  • @JackCushman This looks like a promising suggestion, any chance you could contribute a full syntax as an answer? – Konrad Aug 28 '23 at 13:36