Page break in print for dynamic content
<p>I have an data on print screen page. I want that split data into one page and after that another data should be print on another page. It means data should not be split. My content is dynamic. This is my problem screenshot...</p>

<p>Normal page</p>

<p><a href="https://i.stack.imgur.com/qMrhC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qMrhC.png" alt="enter image description here"></a></p>

<p>Print page</p>

<p><a href="https://i.stack.imgur.com/DGrcQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DGrcQ.png" alt="enter image description here"></a></p>

<p>This is my demo code..</p>

<pre><code>&lt;div class="row extra_bottom_border"&gt;
                &lt;div class="col-lg-12"&gt;
                  &lt;section class="panel"&gt;
                    &lt;header class="panel-heading extrarextcss"&gt;
                        &lt;?php echo $this-&gt;lang-&gt;line('requisition_data');?&gt;
                    &lt;/header&gt;
                    &lt;div class="panel-body"&gt;
                      &lt;div class="activity terques"&gt;
                        &lt;div class="row activity-desk printcss_class"&gt;
                          &lt;?php 
                          if(isset($farmer_ques_ans))
                          {
                          foreach ($farmer_ques_ans as $key =&gt; $value) { ?&gt;
                            &lt;div class="col-lg-6 print_css"&gt;
                              &lt;div class="panel" style="width: 100%;"&gt;
                                  &lt;div class="panel-body" style="padding-top: 7px;padding-bottom: 7px;"&gt;
                                      &lt;div class="arrow"&gt;&lt;/div&gt;
                                      &lt;h4&gt;&lt;?php echo $value['question']; ?&gt;&lt;/h4&gt;
                                      &lt;p&gt;&lt;?php echo $value['answer']; ?&gt;&lt;/p&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                            &lt;/div&gt;
                          &lt;?php } } ?&gt;  
                        &lt;/div&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                  &lt;/section&gt;
                &lt;/div&gt;
              &lt;/div&gt;
</code></pre>

<p>I tried this solution link also..</p>

<p><a href="https://stackoverflow.com/questions/2332100/how-to-add-page-break-dyanamically-to-print-page">How to add Page Break dyanamically to Print page?</a></p>

<p>But its not working fine with my code..</p>