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.

Nested break does not cause page to wrap

See original GitHub issue

Describe the bug

    <Page wrap size="A4" style={styles.body}>
           <Text break>other page</Text>
     </Page> 

i have only a page ( Not break and generate other page is one page )

To Reproduce

import { Page, Font, Image, Text, View, Document, StyleSheet } from '@react-pdf/renderer';
  body:{
    paddingTop: 100,
    paddingBottomm: 100,
    paddingLeft: 30,
    paddingRight: 30,
    fontSize: 10,
    fontFamily: 'Open Sans'
  },
    <Page wrap size="A4" style={styles.body}>
           <Text break>other page</Text>
     </Page> 

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
dmytro-shchurovcommented, Dec 28, 2020

For me page breaking also does not work even with no break attribute. I use pdf(document).toBlob() and lot of paddings/margins (because it not possible to create a rich view without them)

UPD. After some experiments I’ve found out that style.padding: '20px 50px' appears working visually, but causes the problem with a page break. Changing this to paddingTop: 50, ... solves the problem for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's the best way to break from nested loops in JavaScript?
I'm a little late to the party but the following is a language-agnostic approach which doesn't use GOTO/labels or function wrapping:
Read more >
Nested enumerate list, Page breaks - LaTeX Stack Exchange
One option would be to wrap your list inside a minipage ( minipage s don't admit page ... No page breaks won't occur...
Read more >
Ultimate React Router v6 Guide
React Router is by far the most popular routing library in React and this article goes in depth on everything you need to...
Read more >
Grid system — Vuetify
Column wrapping. When more than 12 columns are placed within a given row (that is not using the .flex-nowrap utility class), each ...
Read more >
Text - React Native
In the following example, the nested title and body text will inherit the fontFamily ... const bodyText = "This is not really a...
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