It is currently Thu Nov 28, 2024 7:41 am
val wordMlPackage = Docx4J.load(...)
val mainDocPart = wordMlPackage.mainDocumentPart
// some Kotlin sugar for getting all P's from content, and then mapping each to its outlineLvl value
val outlineLvls = mainDocPart.content.filterIsInstance<P>().map { it.pPr?.outlineLvl }
println(outlineLvls) // [null, null, ..., null]
Total posts 10111 • Total topics 2842 • Total members 2074