Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • pagedjs pagedjs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 202
    • Issues 202
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pagedjs
  • pagedjspagedjs
  • Issues
  • #379

Closed
Open
Created Jun 20, 2022 by David Mulder@DavidMulder0

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.

Assignee
Assign to
Time tracking