I have a Java application using https://odftoolkit.org/ that does something like this:
File file = new File("Foo.odt");
OdfTextDocument odt = OdfTextDocument.newTextDocument();
// [snip adding of content]
odt.save(file);
odt.close();
Where a odt document is created, however what i would like to do is :
File file = new File("Foo.docx");
OdfTextDocument odt = OdfTextDocument.newTextDocument();
// [snip adding of content]
odt.exportDocx(file); // <-- This Made up to illustrate the idea.
odt.close();
As LibreOffice can do this, I expect that the routines are somewhere, but cannot find where.
Note: I would rather not make a system call to libreOffice, or especially open the document manually