Stop bundling a custom document-formats.js with office importer

Hi everyone,

the jodconverter library we use to manipulate office documents in XWiki allows to specified some import / export configurations in a JSON data structure. We currently bundle in XWiki Standard a custom version of this file available there: xwiki-platform/document-formats.js at master · xwiki/xwiki-platform · GitHub

However, I recently started to work (see: https://github.com/xwiki/xwiki-platform/pull/2042) on upgrading the jodconverter dependency to latest version, and as part of this work I entirely reviewed this file, to compare it to the standard version of the file which is provided and bundled in jodconverter itself. It appears that:

  1. our file is currently very outdated compared to the official version of the library
  2. it seems that we don’t need anymore any of the customization we have in this file

So my proposal here is that we stop bundling a custom version of this file, and that we by default only rely on the standard version bundled in jodconverter. The big advantage is that it will simplify a lot the upgrades in the future. Also note that we have documentation (Office Macro (XWiki.org)) about customizing this configuration: those customization would be still valid, and we should keep that documentation (with an updated pointer to the example file).

wdyt?

As long as it does not break things that used to work, it’s fine with me, you know better.

Same as Thomas. If nothing is broken then it looks like the good thing to do.

Thanks

+1

Thanks,
Marius

+1 if the tests confirm that everything is working. Thank you!

So for information there’s one custom property in our document-formats.js that is needed for our conversion of office presentations, so we cannot drop it for now.
I opened a ticket on jodconverter side to see if it could be included in the standard file, see: Add publish mode to presentation->html conversion in document-formats.json · Issue #323 · jodconverter/jodconverter · GitHub for the follow up.
I’m marking this proposal as resolved for now as I cannot drop it.