cuba-platform / yarg

Yet Another Report Generator - CUBA Platform reporting engine
https://www.cuba-platform.com
Apache License 2.0
248 stars 74 forks source link

Namespace mapping problem in docx4j dependency #183

Open NikitaShchienko opened 2 months ago

NikitaShchienko commented 2 months ago

Environment

Description

Latest version of MS word is adding the namespace - http://schemas.microsoft.com/office/wor ... l/word16du - and it is creating a problem when an edit happens to the file using docx4j. When using such files in YARG, the user receives the message - Word Found unreadable Content’

Forum: https://forum.jmix.io/t/report-yarg-dependencies-breaking-docx-ouput-issue/5192 Issue: https://www.docx4java.org/forums/docx-java-f6/new-namespace-mapping-issue-t3112.html

This problem is resolved in version 8.3.10.

Workaround:

compile(group: "org.docx4j", name: "docx4j-JAXB-ReferenceImpl", version: "8.3.10") {
    exclude(group: 'junit', module: 'junit')
    exclude(group: 'log4j', module: 'log4j')
    exclude(group: 'org.slf4j', module: 'slf4j-api')
    exclude(group: 'com.fasterxml.jackson.core')
}
compile(group: "org.docx4j", name: "docx4j-ImportXHTML", version: "8.3.10") {
    exclude(group: 'junit', module: 'junit')
    exclude(group: 'org.apache.poi', module: 'poi')
    exclude(group: 'log4j', module: 'log4j')
    exclude(group: 'org.slf4j', module: 'slf4j-api')
    exclude(group: 'com.fasterxml.jackson.core')
}
compile(group: "org.docx4j", name: "docx4j-export-fo", version: "8.3.10") {
    exclude(group: 'junit', module: 'junit')
    exclude(group: 'log4j', module: 'log4j')
    exclude(group: 'org.slf4j', module: 'slf4j-api')
    exclude(group: 'com.fasterxml.jackson.core')
}