Page breaks not recognised in LO 6.3.3.2

Hi

I have the attached docx. When opened in LibreOffice 5.4 it appears as 3 pages. However in the latest release 6.3.3.2, the page breaks are being ignored. Is this an issue with this release ?
output.docx

And what happens if you save as .odt?

How are your page breaks inserted? Manually or through a paragraph style?

To provide information, edit your question (not an answer) or comment the relevant answer.

I’ve opened your attached file using OpenOffice 4.1.7, LibreOffice 5.4.7.2 and 6.2.8.2. None of these shows more than 1 page.

I am not interested in saving as ODT. The page break was inserted via a third party library to manipulate docx files

I can open in writer in versions 5.4.7.2 and 6.2.8.2 (Windows 7 Pro) and it shows 3 pages. Only 6.3.3.2 doesn’t

Please file a bug report against the authors of that library, that tries to insert breaks in wrong places…

    <w:p>
        <w:pPr>
            <w:pStyle w:val="Normal"/>
            <w:bidi w:val="0"/>
            <w:jc w:val="left"/>
            <w:r>                     <!-- Look at this! -->
                <w:br w:type="page"/> <!-- Look at this! -->
            </w:r>                    <!-- Look at this! -->
            <w:rPr/>
        </w:pPr>
        <w:r>
            <w:rPr/>
        </w:r>
    </w:p>

Facepalm!

And if LibreOffice have ever inserted page breaks at those places, we should have filed a bug against LO to stop doing that.

But luckily (just tested with 5.4.6.2 and 6.1.5.2 on Win10), we have never done that :slight_smile:

Thanks for the analysis. It does look like an issue with LO. The third party library replaces a named token with a paragraph that has the a style with the setting “page break after”.

A bug report with details has been filed at:

https://bugs.documentfoundation.org/show_bug.cgi?id=128889

As per the bug report, it is this style that is not working in the later version of LibreOffice.

This is not an issue with LibreOffice. That third-party library generates invalid OOXML, because the w:r element with w:br child must not appear under w:pPr element - see ECMA-376-1:2016 section 17.3.1.26 pPr (Paragraph Properties).

But tdf#128889 you filed is a valid one, though different from what is asked here.

EDIT: I now understand what you mean. So thank you for filing the bug against the software that generates the wrong markup, which turned out to be - LibreOffice :smiley: