How to control page breaks with react-native-html-to-pdf?

Viewed 133

I am generating a pdf document using react-native-html-to-pdf.

When the document contains a long list of elements it is possible for some elements to span two pages within the same document.

For example this simple html:

<html>
  <head></head>
  <body>
    <section style="border:solid 1px black;"><p>item</p></section>
    <!-- sections repeat 32 times omitted for brevity -->
  </body>
</html>

I get a document that looks like this at the page break:

pdf with section spanning two pages

How can I control this? Does it depend on the html elements in the document?

0 Answers
Related