If you don't set spacing in your input xhtml p, default css values will be used, and applied expressly on each w:p.
I think see com.openhtmltopdf.simple.extend.XhtmlNamespaceHandler and
https://github.com/plutext/docx4j-Impor ... andler.cssSo try changing that.
A value set expressly in a w:p/w:pPr overrides document default pPr, so you'd need to remove the express values to give effect to the document default pPr
Alternatively, you could try setting setParagraphFormatting(FormattingOption.CLASS_TO_STYLE_ONLY), which should result in a Word style matching a class attribute will be used, and nothing else. In other words, all direct formatting should be ignored.
Or:
Using java Syntax Highlighting
/**
* If the CSS white list is non-null,
* a CSS property will only be honoured if it is on the list.
*
* Useful where suitable default values aren't being provided via
* @class, or direct values are otherwise providing unwanted results.
*
* Using this should be a last resort.
*
* @param cssWhiteList the cssWhiteList to set
*/
@Deprecated
public static void setCssWhiteList
(Set
<String
> cssWhiteList
) {
XHTMLImporterImpl.
cssWhiteList = cssWhiteList
;
}
Parsed in 0.014 seconds, using
GeSHi 1.0.8.4