Unable to process a document with 0.5" margins
Posted: Fri Oct 28, 2022 11:28 pm
Caused by: javax.xml.bind.JAXBException: For input string: "215.99999"
Attached the document we use as a template for variable replacement.
Will adding the margins to docx4j.properties work or should I handle it with custom-preprocessor.xslt?
Thanks!
Attached the document we use as a template for variable replacement.
- Code: Select all
WordprocessingMLPackage wordMLPackage;
try {
wordMLPackage = WordprocessingMLPackage.load(template);
MainDocumentPart documentPart = wordMLPackage.getMainDocumentPart();
Document wmlDocumentEl = documentPart.getJaxbElement(); // failing on this line with several NumberFormatExceptions
Body body = wmlDocumentEl.getBody(); // wmlDocumentEl is null
Will adding the margins to docx4j.properties work or should I handle it with custom-preprocessor.xslt?
Thanks!