title: Auto page break while content overflow - mpdf
body: <p>I am using mpdf php library to generate pdf for my invoice.
  In invoice I have list of product which I am listing using table. But when my product list get increased on pdf all product squeezed on single page.</p>
  <pre><code>&lt;table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
      &lt;tr&gt;
          &lt;td width=&quot;8%&quot; class=&quot;left-stripes&quot;&gt;&lt;/td&gt;
          
          &lt;td width=&quot;92%&quot; class=&quot;right-invoice&quot;&gt;
              &lt;table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
                  &lt;tr&gt;
                      &lt;td width=&quot;50%&quot; class=&quot;billed-to-info&quot;&gt;
                          Billed To,
                          &lt;h3&gt;Party Name&lt;/h3&gt;
                          Party Detailed Address &lt;br&gt;
                          0124-234564 &lt;br&gt;
                      &lt;/td&gt;
                      &lt;td width=&quot;50%&quot; align=&quot;right&quot;&gt;&lt;img src=&quot;&lt;?php echo base_url(); ?&gt;assets/img/tophead.jpg&quot; class=&quot;topHeaderImageRight&quot; /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td class=&quot;order-info&quot; valign=&quot;top&quot; style=&quot;padding-top: 20px;padding-left:10px;&quot;&gt;
                          Order ID: #602 &lt;br /&gt;
                          Delivery Date: 25 April 2016
                      &lt;/td&gt;
                      &lt;td class=&quot;billed-to-info&quot; style=&quot;padding-top: 20px;&quot;&gt;
                          &lt;span&gt;Billed By,&lt;/span&gt;
                          &lt;h3&gt;Party Name&lt;/h3&gt;
                          Party Address Details &lt;br&gt;
                          0712-277 4770 &lt;br&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
              &lt;br /&gt;
              
              &lt;table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;product-list-table&quot;&gt;
                  &lt;tr style=&quot;background-color: #F5F5F5 !important;&quot;&gt;
                      &lt;th class=&quot;productinfo-header text-center&quot;&gt;&lt;/th&gt;
                      &lt;th class=&quot;productinfo-header text-left&quot;&gt;Item&lt;/th&gt;
                      &lt;th class=&quot;productinfo-header text-center&quot;&gt;Mfg. Date&lt;/th&gt;
                      &lt;th class=&quot;productinfo-header text-center&quot;&gt;Expiry Date&lt;/th&gt;
                      &lt;th class=&quot;productinfo-header text-right&quot;&gt;QTY&lt;/th&gt;
                      &lt;th class=&quot;productinfo-header text-right&quot;&gt;MRP&lt;/th&gt;
                      &lt;th class=&quot;productinfo-header text-right&quot;&gt;Rate&lt;/th&gt;
                      &lt;th class=&quot;productinfo-header text-right&quot;&gt;Total&lt;/th&gt;
                  &lt;/tr&gt;
                  &lt;?php
                      for ($i=0; $i &lt; 22; $i++) { 
                  ?&gt;
                  &lt;tr&gt;
                      &lt;td width=&quot;5%&quot; class=&quot;productinfo-list text-center&quot;&gt;1&lt;/td&gt;
                      &lt;td width=&quot;28%&quot; class=&quot;productinfo-list text-left&quot;&gt;Haldi Powder (100 gm)&lt;/td&gt;
                      &lt;td width=&quot;15%&quot; class=&quot;productinfo-list text-center line-height-21&quot;&gt;
                          01 Feb 16 (10) &lt;br /&gt;
                          01 Mar 16 (30)
                      &lt;/td&gt;
                      &lt;td width=&quot;15%&quot; class=&quot;productinfo-list text-center line-height-21&quot;&gt;
                          01 Oct 16(10) &lt;br /&gt;
                          01 Nov 16(30)
                      &lt;/td&gt;
                      &lt;td width=&quot;8%&quot; class=&quot;productinfo-list text-right&quot;&gt;40&lt;/td&gt;
                      &lt;td width=&quot;8%&quot; class=&quot;productinfo-list text-right&quot;&gt;60.00&lt;/td&gt;
                      &lt;td width=&quot;8%&quot; class=&quot;productinfo-list text-right&quot;&gt;55.23&lt;/td&gt;
                      &lt;td width=&quot;13%&quot; class=&quot;productinfo-list text-right&quot;&gt;5246.00&lt;/td&gt;
                  &lt;/tr&gt;
                  
                  &lt;tr&gt;
                      &lt;td class=&quot;productinfo-list text-center&quot;&gt;12&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-left&quot;&gt;Haldi Powder (200 gm)&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-center&quot;&gt;01 Feb 16&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-center&quot;&gt;01 Oct 16&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-right&quot;&gt;10&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-right&quot;&gt;110.00&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-right&quot;&gt;90.23&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-right&quot;&gt;902.30&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;?php } ?&gt;
                  &lt;tr&gt;
                      &lt;td colspan=&quot;4&quot; rowspan=&quot;4&quot; class=&quot;productinfo-list line-height-21&quot;&gt;
                          &lt;span&gt;Buyer's VAT: 1234566&lt;/span&gt;&lt;br /&gt;
                          &lt;span&gt;Seller's VAT: 326541233&lt;/span&gt;&lt;br /&gt;
                          &lt;span&gt;Account Number: 12354647&lt;/span&gt;&lt;br /&gt;
                          &lt;span&gt;IFSC Code: BFGH1234&lt;/span&gt;
                      &lt;/td&gt;
                      &lt;td colspan=&quot;3&quot; class=&quot;productinfo-list&quot;&gt;Gross Total&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-right&quot;&gt;6100.23&lt;/td&gt;
                  &lt;/tr&gt;
                  
                  &lt;tr&gt;
                      &lt;td colspan=&quot;3&quot; class=&quot;productinfo-list&quot;&gt;Scheme Discount&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-right&quot;&gt;100.23&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td colspan=&quot;3&quot; class=&quot;productinfo-list&quot;&gt;VAT&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-right&quot;&gt;531.10&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td colspan=&quot;3&quot; class=&quot;productinfo-list&quot;&gt;Net Total&lt;/td&gt;
                      &lt;td class=&quot;productinfo-list text-right&quot;&gt;6500.10&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
              &lt;pagebreak /&gt;
              &lt;br /&gt;&lt;br /&gt;                
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>