Nested break does not cause page to wrap
See original GitHub issueDescribe 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.
Desktop (please complete the following information):
- OS: [Windows]
- Browser [chrome] “@react-pdf/renderer”: “^1.6.11”,
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@diegomura in the first release of v2. This issue has been fixed. But when I tried it recently, it happened again
Example: https://react-pdf.org/repl?code=3187b0760ce02e00408a057025803c450298c0bc300500943807cf805030c00f0022230080b6198531165d400a02180e619da74e5400a86146c00c9230580231500f4e3250e1d401a920c01ddd46ad3b74c0046009c30f00d6d80379473083005f039c02407b113a6cac004ccaaa6c1c86cada7aee9411c6eecabc02eaca740cccacec0400dc64640062e0500074967c48d018e678761c00663c8c480036009e005c3000e400f210ba3c4d00269d00341c10e6c01d9d00165050000e106d4a4ab58510457cd03c5048c045a08c4a104a207d03834a006ef200cc4a009a00faa200d29a006c20001c00ea206ba9800aa833ba319e000d00270f0008270a2bcd6a9d320b9b2b9001295980502e0d0f2251620d2a782a22150e82c1298818a00000
For me page breaking also does not work even with no
break
attribute. I usepdf(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 topaddingTop: 50, ...
solves the problem for me.