Office conversion configuration (document-formats.js) is not up to date

Hi devs,

While working with @trrenty to improve the OnlyOffice Connector with optional LibreOffice conversion (when OnlyOffice doesn’t support the input or the automatic conversion done by OnlyOffice is not good enough) we were surprised to discover that our office conversion API doesn’t support ODT to DOCX conversion, even though LibreOffice itself supports it. The reason is because the file that configures the office conversion, document-formats.js, is not up to date. How we got here:

This means that ATM we use an old configuration (document-formats.js) with two customizations (XJODC-2: Force a specific Publish Mode for the impress_html_Export fi… · xwiki-attic/jodconverter@927f059 · GitHub and XWIKI-19818: ODT export doesn't produce 'real' odt documents but 'off… · xwiki/xwiki-platform@c6d7578 · GitHub) that overwrites the default config from sbraconnier/jodconverter which is quite different (it supports additional conversions, among other things).

How do we deal with this? Short term we should probably take the latest document-formats.json, apply our 2 customizations and modify our code to look for .json also besides .js (for backwards compatibility). But on the long run, does it make sense to provide our own version of document-formats.json?

  • if not, then we should try to push our changes to sbraconnier/jodconverter (assuming that others may benefit from them) and remove our own version
  • if yes, then at least add a comment in the POM where the jodconverter version is specified to not forget to merge the document-formats.json changes when upgrading jodconverter.



Nice detective work :wink:

No it doesn’t.



+1, our changes don’t seem XWiki specific

+1 but we need to ensure that it’s still possible to override it with a provided document-formats.js file as documented in