There's nothing in docx4j to make it trivially easy to use section, sub-section. (Bullets should be OK - please search/browse SdtToListSdtTagHandler for more)
Docx4j can create HTML:
1. via XSLT (with Java extension functions); see
https://github.com/plutext/docx4j/blob/ ... -core.xsltor 2. using Java to traverse the document; see
https://github.com/plutext/docx4j/blob/ ... rator.javaThe XSLT approach is more fully featured, but somewhat slower (and a bit more complex since it uses both XSLT and Java).
To use section, sub-section, choose your preferred approach, then start modifying...
If you want to map eg style heading 1 to section, and heading 2 to sub-section, ListsToContentControls does a similar thing for bullets/numbering:
https://github.com/plutext/docx4j/blob/ ... .java#L213