react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

Text overlaps its container on multiple pages with fixed elements

Open izmaelmag opened this issue 4 years ago • 4 comments
trafficstars

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 1/3 Page 2/3 Page 2/3 Page 3/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

izmaelmag avatar Aug 02 '21 06:08 izmaelmag

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

GusMartins499 avatar Aug 27 '21 18:08 GusMartins499

Anyone found a solution yet?

Update

I found a solution here , it worked for me.

waleedabdeen avatar Nov 21 '21 20:11 waleedabdeen

As a workaround you can add paddingBottom to the Page and negative marginBottom to the footer. See demo.

michal-perlakowski avatar Nov 21 '22 10:11 michal-perlakowski

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?

Arctomachine avatar Apr 23 '25 02:04 Arctomachine

@waleedabdeen https://symfony-forms-blue-green.github.io/q32IMFVKPc8BCFLKTZFzZlHQCog0endrq3CsrlyJWPUD8lMwwVzKbocQOeerRHoG/