I need to convert doc to docx for which I am using JODConveter (OpenOffice), but unfortunately my code is breaking with error code 2074. Can anyone throw more insight into what this errorCode means and how i can fix it.
My code is shared below :
OfficeManager officeManager =
new DefaultOfficeManagerConfiguration().setOfficeHome(
new File("C:\\Program Files (x86)\\OpenOffice4")).buildOfficeManager();
officeManager.start();
OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager);
DocumentFormat docx = converter.getFormatRegistry().getFormatByExtension("docx");
docx.setStoreProperties(DocumentFamily.TEXT,
Collections.singletonMap("FilterName",
"MS Word 2007 XML"));
converter.convert(new File("C:\\localFiles\\abc.doc"),
new File("C:\\localFiles\\abc_new.docx"));
officeManager.stop();
However if I change the extension of my expected file from docx to pdf the above code works perfectly fine.