title: dompdf page breakes not working
body: <p><a href="http://i.stack.imgur.com/hf2kB.png" rel="nofollow">here is sample image</a></p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html class="bg-black"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;&lt;?php if(isset($title)) echo $title.' | '; ?&gt;  Sales agent management software (SAMS) &lt;/title&gt;
  
      &lt;style&gt;
          body{
              font-size: 9px;
              margin: 20px;
          }
          th,td,p,div,table,h3{margin:0;padding:0}
  
          @page { margin: 20px; }
  
          .header{
              border-bottom: 1px solid #dddddd;
              text-align: center;
              position: fixed; top: 0;
          }
          .footer { position: fixed; bottom: 0px; text-align: center }
          .pagenum:before { content: counter(page); }
  
      &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div class="header"&gt;
      &lt;h2&gt;&lt;?php echo get_option('company_name'); ?&gt; Catalog&lt;/h2&gt;
  &lt;/div&gt;
  &lt;br /&gt;&lt;br /&gt;
  
  &lt;div class="footer"&gt;Page: &lt;span class="pagenum"&gt;&lt;/span&gt;, creation time : &lt;?php echo date('l jS \of F Y h:i:s A') ?&gt;, create by: &lt;?php echo user_full_name(singleDbTableRow(loggedInUserData()['user_id'])); ?&gt;&lt;/div&gt;
  
  &lt;br /&gt;
  &lt;div class="box-body"&gt;
  
      &lt;?php
      $usd = get_option('lkr_per_usd', 134);
      ?&gt;
  
  
      &lt;?php
      $result = array_chunk($products-&gt;result_array(), 3);
  
      foreach($result as $products){  ?&gt;
          &lt;table style="width:100% style="page-break-after:always;"   &gt;
  
          &lt;tr&gt;
          &lt;?php 
          foreach($products as $productArray){
              $product = (object) $productArray;
              echo '&lt;td&gt;';
          ?&gt;
  
          &lt;div style="width: 100%; height: 210px;  border: 1px solid #dddddd; margin: 10px; padding: 5px;"&gt;
                  &lt;div class="box-header"&gt;
                      &lt;p class="box-title"&gt;&lt;FONT SIZE=12&gt;&lt;?php echo $product-&gt;product_name; ?&gt;&lt;/FONT&gt;&lt;/p&gt;
                  &lt;/div&gt;
                  &lt;div style="height: 80px; text-align: center;"&gt;
                      &lt;?php echo '&lt;img src="'.'uploads/'. $product-&gt;photo.'" class="img-responsive" style="height:80px !important; width: 150px !important"  /&gt;'; ?&gt;
                  &lt;/div&gt;
  
                  &lt;div style="clear: both"&gt;&lt;/div&gt;
                  &lt;table class="table table-responsive"&gt;
                      &lt;tr&gt;
                          &lt;th&gt;&lt;FONT SIZE=12&gt;ID&lt;/FONT&gt;&lt;/th&gt;
                          &lt;td&gt;&lt;FONT SIZE=14&gt;&lt;?php echo $product-&gt;product_id; ?&gt;&lt;/FONT&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;th&gt;&lt;FONT SIZE=12&gt;LKR&lt;/FONT&gt;&lt;/th&gt;
                          &lt;td&gt;&lt;FONT SIZE=14&gt;&lt;?php $lkr = get_selling_price($product);
                              echo  number_format(round($lkr, get_option('round_precision')) ); ?&gt;&lt;/FONT&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                          &lt;th&gt; &lt;FONT SIZE=12&gt;US $&lt;/FONT&gt;&lt;/th&gt;
                          &lt;td&gt;&lt;FONT SIZE=14&gt;&lt;?php echo number_format(round(lkr_to_usd($lkr), get_option('round_precision')) ); ?&gt;&lt;/FONT&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/table&gt;
  
          &lt;/div&gt;
  
              &lt;/td&gt;
          &lt;?php } ?&gt;
  
      &lt;/tr&gt;
  
      &lt;?php } ?&gt;
  
      &lt;/table&gt;
  &lt;/div&gt;&lt;!-- /.box-body --&gt;
  
  
  &lt;/body&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>when i try to generate pdf it's always coming like this. i added my generate pdf code above .
  2 nd page is not coming like 1st page..  i searched and found other dompdf solution for other peoples problem. but my problem is on 2nd page it's not coming as 1stpage.</p>