- Code: Select all
<p style="text-indent:100px;">indent text</p>
Can anyone suggest me the proper way to feed CSS property while converting xhtml to docx?
It is currently Thu May 01, 2025 12:51 pm
<p style="text-indent:100px;">indent text</p>
private static Cell createCell(String content) {
Cell cell = Context.getsmlObjectFactory().createCell();
CTXstringWhitespace ctx = Context.getsmlObjectFactory().createCTXstringWhitespace();
ctx.setValue(content);
CTRst ctrst = new CTRst();
ctrst.setT(ctx);
cell.setT(STCellType.INLINE_STR);
cell.setIs(ctrst); // add ctrst as inline string
return cell;
}
[java.lang.ClassNotFoundException: org.docx4j.jaxb.ri.NamespacePrefixMapper]
at org.docx4j.XmlUtils.marshaltoW3CDomDocument(XmlUtils.java:983) ~[docx4j-core-11.1.2.jar:?]
at org.docx4j.XmlUtils.marshaltoW3CDomDocument(XmlUtils.java:941) ~[docx4j-core-11.1.2.jar:?]
at org.docx4j.model.datastorage.OpenDoPEIntegrity.process(OpenDoPEIntegrity.java:140) ~[docx4j-core-11.1.2.jar:?]
at org.docx4j.model.datastorage.OpenDoPEIntegrity.process(OpenDoPEIntegrity.java:116) ~[docx4j-core-11.1.2.jar:?]
at com.arianim.swingworker.docx.DocxGenerator$1$1.run(DocxGenerator.java:257) [bin/:?]
java.lang.RuntimeException: javax.xml.bind.JAXBException: namespacePrefixMapper is null
at org.docx4j.XmlUtils.marshaltoW3CDomDocument(XmlUtils.java:983) ~[docx4j-core-8.1.1.jar:?]
at org.docx4j.XmlUtils.marshaltoW3CDomDocument(XmlUtils.java:941) ~[docx4j-core-8.1.1.jar:?]
at org.docx4j.model.datastorage.OpenDoPEIntegrity.process(OpenDoPEIntegrity.java:140) ~[docx4j-core-8.1.1.jar:?]
at org.docx4j.model.datastorage.OpenDoPEIntegrity.process(OpenDoPEIntegrity.java:116) ~[docx4j-core-8.1.1.jar:?]
at com.arianim.swingworker.docx.DocxGenerator$1$1.run(DocxGenerator.java:257) [bin/:?]
Total posts 10160 • Total topics 2859 • Total members 2089