Element that 'causes' a page break with vertical overflow can cause two pagebreaks?
Easiest to explain by showing a MVE
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
</head>
<body>
<div style="height: 850.98px; background: lightgray"></div>
<pre
>abcdefghijklmnopqrstuvwxyzabcdefghijkmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmn<span>WHAT, why is there a pagebreak above this</span></pre>
</body>
</html>
The first div
is supposed to fill the entire first page (so the pre
gets pushed to the next page as expected), however the "WHAT..." somehow ends up on a third page. Here is a print of the result: mve2.pdf
I am seeing this behavior happen in Chrome, Edge and Firefox.