Im trying to convert word files to pdf using docx4j, so far i have successfully converted doc and docx files, but when i try to load an odt file i get
InvalidFormatException: Bad [Content_Types].xml
and by opening the odt file with zip, i can see a content.xml
file (but not a content_types.xml
)
this is how im doing to load the file:
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.load(new java.io.File(inputfilepath));
An odt file is an OpenOffice/LibreOffice file, not a Microsoft Word OpenXML file.
docx4j doesn't handle odt files.