Hello,
I’m running into an issue with XWPFDocument. In a .docx file:
Page breaks are represented in the XML as:
<w:r><w:br w:type="page"/></w:r>
Line breaks (manual line breaks, Shift+Enter) are represented as:
However, after opening the document with XWPFDocument:
The corresponding XWPFRun for both types of breaks has run.getText() == "\n" and run.getCTR().getBrArray() is empty.
This means there is no way to distinguish a page break from a line break when using XWPFRun.
I would expect getBrArray() to contain the <w:br> elements with their type (page or default) so that page breaks can be detected programmatically.
Is this the intended behavior, or is there a way to preserve and distinguish page breaks in POI?
Thanks in advance,