Package org.docx4j.convert.in.xhtml
package org.docx4j.convert.in.xhtml
-
ClassDescriptionOptionally convert each div element to an SDT (aka content control).CLASS_TO_STYLE_ONLY: a Word style matching a class attribute will be used, and nothing else CLASS_PLUS_OTHER: a Word style matching a class attribute will be used; other css will be translated to direct formatting IGNORE_CLASS: css will be translated to direct formattingThis class allows us to get the bodyConsider p/@style="border: 1px solid black;padding-left:20px;" That should generates something like: <w:pBdr> <w:left w:val="single" w:sz="6" w:space="15" w:color="000000"/> Because this is multiple CSS properties to one WordML element, it is best to handle it in this dedicated helper class.Convert XHTML + CSS to WordML content.