title: PDF-Creation in Swift: Create New Page Automatically
body: <p>I want to include the PDF-Creation of a (very long) table in my app.</p>
  
  <p>I used this tutorial, to create a PDF file from a HTML-template: <a href="https://www.appcoda.com/pdf-generation-ios/" rel="nofollow noreferrer">https://www.appcoda.com/pdf-generation-ios/</a></p>
  
  <p>This works well, however, when I have a very long table (with differently sized rows), I would like to <em>automatically</em> start a new page. How is this possible (to detect, if the current PDF-page is full)?</p>
  
  <p>Example: Too many items, no space to print footer and some items are missing </p>
  
  <p><a href="https://i.stack.imgur.com/tyEYQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tyEYQ.png" alt="Example"></a></p>