react-pdf
react-pdf copied to clipboard
Text overlaps its container on multiple pages with fixed elements
Describe the bug Hi! I'm trying to make a layout with a fixed header and footer and content between them. If there are several pages text overlaps the footer but its container is not
To Reproduce See REPL
Screenshots
Page 1/3
Page 2/3
Page 3/3

Expected behavior The text node is not overlapping the footer and moves on the next page within its container
Desktop:
- OS: MacOS
- Browser: Chrome
- React-pdf version: both 1 & 2
Describe the bug Hi! I'm trying to make a layout with a fixed header and footer and content between them. If there are several pages text overlaps the footer but its container is not
To Reproduce See REPL
Screenshots Expected behavior The text node is not overlapping the footer and moves on the next page within its container
Desktop:
- OS: MacOS
- Browser: Chrome
- React-pdf version: both 1 & 2
same issue bro
As a workaround you can add paddingBottom to the Page and negative marginBottom to the footer. See demo.
What if footer has variable content and height is not known at build time? User can change content of footer and make different number of lines. Is there reliable way to calculate height or any other workaround?
@waleedabdeen https://symfony-forms-blue-green.github.io/q32IMFVKPc8BCFLKTZFzZlHQCog0endrq3CsrlyJWPUD8lMwwVzKbocQOeerRHoG/