Forum How do I...?

Empty last page / wrong pages counter

CsKwg
When rendering a certain document with PrinceXML, it always creates an empty last page.
The remainder of the document has headers and footers, but this last page is completely empty (white).
When printing with Edge or Firefox, the number of pages is correct.
The formatting of all other pages is very good, all counters are as expected.
But this empty last page leads to a wrong pages counters, 1 too high.
When using background-color for debugging, the empty area indicates <body>, nothing else.

Edited by CsKwg

mikeday
Could there be an empty element or ::after pseudo-element with page-break-before: always? Or perhaps an element with a large fixed height?
CsKwg
I could find it: The complete content was included in an additional DIV, like so:

<body><div class="page_xxx">content</div></body>

After removing the DIV, it started working correctly:

<body class="page_xxx">content</body>