java - How to remove default formatting(indents and line spacing) when using docx4j `mainDocumentPart.convertAltChunks()`? - Sta

admin2025-04-17  2

When using a HTML content string, embedded as a altchunk in docx using docx4j, and converted to docx elements using mainDocumentPart.convertAltChunks(), by default there is some indentation and line spacing applied which I want to customize only for the whole altchunk converted..

Tried decreasing the indentation by 0.08 for all the elements which cause issues with non-altchunk converted elements that could possibly be excluded.

Is there a more subtle way to have no formatting applied over altchunk converted elements or apply default formatting over only these elements?

转载请注明原文地址:http://anycun.com/QandA/1744855460a88570.html