DomPDF rendert Tabelle nicht schön

Ich versuche, PDF mit DomPDF abzurufen, stoße jedoch auf ein seltsames Problem. Alle Daten und andere Dinge sind in Ordnung, aber wenn es in PDF gerendert wird, ist die erste Zeile der Tabelle immer unpassend. Erstens kann es sein, dass table zur nächsten Seite wechselt, was einen Stil außerhalb des Kontexts verursacht. Ich habe jedoch versucht, table auf eine Seite zu beschränken, und dabei festgestellt, dass das Problem weiterhin besteht. Die erste Tabellenreihe auf jeder Seite wird also verrückt. Es folgen mein Code und Screenshots von PDF.

Regle

$dompdf = new DOMPDF();
$dompdf->load_html($listing);
$dompdf->set_paper('a4', 'landscape');
$dompdf->render();
$dompdf->stream("sample.pdf");

Aussich

<table class="table table-bordered">
    <tr>
        <th width="150">Client </th>
        <td>Client Name </td>
    </tr>

    <tr>
        <th>Site </th>
        <td><?php print $site->title; ?></td>
    </tr>

    <tr>
        <th>Address </th>
        <td>
            <?php 
                print $site->unit.' '.
                $site->street.' '.
                $site->suburb.' '.
                $site->state.' '.
                $site->location; 
            ?>
        </td>
    </tr>

    <tr>
        <th>Post Code </th>
        <td><?php print $site->postcode; ?></td>
    </tr>
    <tr>
        <th colspan="2"> Site Information</th>
    </tr>
    <tr>
        <td colspan="2" height="150"> <?php print $site->site_information; ?></td>
    </tr>
    <tr>
        <th colspan="2">Work Instruction</th>
    </tr>
    <tr>
        <td colspan="2" height="200"> <?php print $site->work_instruction; ?></td>
    </tr>
    <tr>
        <th colspan="2">Equipment on Site</th>
    </tr>
    <tr>
        <td colspan="2"> <?php print $site->site_equipment; ?></td>
    </tr>
    <tr>
        <th colspan="2">Special Instructions</th>
    </tr>
    <tr>
        <td colspan="2" height="100"> <?php print $site->special_instruction; ?></td>
    </tr>
    <tr>
        <th>Contact Person </th>
        <td><?php print $site->contact_person; ?></td>
    </tr>
    <tr>
        <th>Contact Number </th>
        <td><?php print $site->contact_no; ?></td>
    </tr>
</table>

Seite 1

Seite 2

Jede Hilfe wird sehr geschätzt. Vielen Dan

Antworten auf die Frage(4)

Ihre Antwort auf die Frage