question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why does rendering get confused when I have a page break caused by the content?

See original GitHub issue

Whenever I have a page break caused by the content being bigger than the page, the subsequent content gets all mashed together

This is the expected behaviour, which I could achieve by reducing the font size so the content doesn’t overflow the page height: image

And this is what I get when the text from the previous page causes a break: image

This PDFs are rendered on the server using the ReactPDF.renderToStream function.

  • OS: macOS, AmazonLinux 2
  • Node v.14.15.0
  • React-pdf v1.6.14

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
timvandevelde-ypacommented, Sep 21, 2021

Hi @diegomura, loving React-pdf so far! I have the same issue as described above, only I have a layout where there is no other obvious way than having a View element initiating a page break: two column layout:

image

As you can see, the text on the second page is compressed, and sometimes even the text on the first page gets squashed depending on the content. The whole document is rendered on the fly with API data and WYSIWYG parsing so it’s a bit of work to make a snippet, but I can try to make a quick proof of concept in REPL if you want.

1reaction
diegomuracommented, Apr 11, 2021

Glad to hear that!!! Makes sense for that view not to be there. I’m excited that you can use 2.0 now without any issues. Closing this now. Thanks!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Section break causes an unexpected page break in Word
Symptoms. In Microsoft Word, when you insert a section break into a page, a page break may be inserted instead. Note This behavior...
Read more >
Page Breaks Ignored by Render Tool - Alteryx Community
Once the report is Rendered, content from Page 2 is pulled onto Page 1 because, like the message is warning, the Page Break...
Read more >
How to Fix Render-Blocking JavaScript and CSS in WordPress
Render blocking JavaScript and CSS are files that prevent a website from displaying a web page before loading these files.
Read more >
10 Rendering — HTML5 - W3C
Whether a video element is exposing a user interface is not expected to affect the size of the rendering; controls are expected to...
Read more >
Provide Page Break macro | Confluence Cloud - Jira - Atlassian
Having this macro out of the box for OnDemand users would allow them to use this key value of using the content without...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found