DOMPDF table breaks wrongly

时间:2018-03-25 18:50:01

标签: html laravel dompdf

I'm using Laravel DOMPDF Wrapper and I want to print a table on a PDF but when it reaches the bottom of the page, my table breaks, I want the whole to go down but can't find a way to do this.

Table Structure:

<table class="tabla1">
    <tr align="center">
        <td style="width: 35px;" >Nº</td>
        <td>FROM</td>
        <td>TO</td>
        <td class="hiddebottom">DETAILS</td>
        <td style="width: 60px;">COST</td>
    </tr>
    <tr align="center">
        <td class="hiddebottom"></td>
        <td>Takami Rodriguez</td>
        <td>Sara portan</td>
        <td class="ocultar"></td>
        <td class="ocultar"></td>
    </tr>
    <tr align="center">
        <td class="ocultar">1</td>
        <td class="dir">asdasdasdasdassadasasdasdasd</td>
        <td class="dir">asdasddadasdsadadadadadasdasdasd</td>          
        <td>&bsp;</td>
        <td class="ocultar">$23</td>
    </tr>
    <tr align="center">
        <td class="hidetop"></td>
        <td> 61569559 </td>
        <td> 61569559 </td>
        <td></td>
        <td class="hidetop"></td>
    </tr>
</table>

I'm using:

table tr td{
    border: 0.3px solid black;
    page-break-inside: avoid !important;
}

enter image description here

Helps please

1 个答案:

答案 0 :(得分:0)

尝试将CS​​S更改为此。

table {
  border: 0.3px solid black;
  page-break-inside: avoid !important;
}