title: Rowspan in Nested Foreach Table in Laravel DOMPDF
body: <p>I tried to generate PDF using barryvdh/laravel-dompdf in Laravel 8. My table is using rowspan. I could generate the PDF successfully, but it's not build the rowspan correctly on the page break <a href="https://i.stack.imgur.com/4wgdO.png" rel="nofollow noreferrer">like this</a>. This only happened on the last two page. I already tried to setting my CSS and style, used <code>page-break-after:always; </code>, and <code>$loop-&gt;iteration</code> but it's still didn't work. This is my code:</p>
  <p>View:</p>
  <pre><code>&lt;tbody&gt;
    @foreach($sasarans as $i =&gt; $sasaran)
    @foreach($sasaran-&gt;indikator as $indikator)
    @foreach($indikator-&gt;pertanyaan as $pertanyaan)
      &lt;tr style=&quot;margin-top:-20px; margin-bottom:-25px;&quot;&gt;
         //Some data here
         @foreach($pertanyaan-&gt;data_laporan as $data)
            //Some data  
            @if($loop-&gt;iteration % 15 == 0)
               &lt;div class=&quot;page-break&quot;&gt;&lt;/div&gt;
            @endif
         @endforeach
      &lt;/tr&gt;
      @endforeach
     @endforeach
   @endforeach
  &lt;/tbody&gt;
  </code></pre>
  <p>CSS:</p>
  <pre><code>.page-break {
     display:block;
     page-break-after: always;
   }
  </code></pre>
  <p>Please help me because I'm still a beginner. Thank you for your help.</p>