Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Guidelines
Description of the bug
I want to move the table from page 2 to page 1, and if the table content exceeds one page, continue it on page 2.


mPDF version
8.1.0
PHP Version and environment (server type, cli provider etc., enclosing libraries and their respective versions)
8.2.4
Reproducible PHP+CSS+HTML snippet suffering by the error
`<?php
$html = '
<style> body {font-family: sans-serif; font-size: 10pt;} p { margin: 0pt; } table.items { border: 0.1mm solid #000000; border-collapse: collapse; width: 100%; } td { vertical-align: top; } .items td { border: 0.1mm solid #000000; } table thead td { background-color: #EEEEEE; text-align: center; font-variant: small-caps; } .items td.blanktotal { background-color: #FFFFFF; border-top: 0.1mm solid #000000; border-right: 0.1mm solid #000000; } .items td.totals { text-align: right; } .items td.cost { text-align: center; } </style>345 Anotherstreet
Little Village
Their City
CB22 6SO
345 Anotherstreet
Little Village
Their City
CB22 6SO
require_once DIR . '/bootstrap.php';
$mpdf = new \Mpdf\Mpdf([
'margin_left' => 20,
'margin_right' => 15,
'margin_top' => 48,
'margin_bottom' => 25,
'margin_header' => 10,
'margin_footer' => 10
]);
$mpdf->use_kwt = true;
$mpdf->shrink_tables_to_fit = 1;
$mpdf->SetProtection(array('print'));
$mpdf->SetTitle("Acme Trading Co. - Invoice");
$mpdf->SetAuthor("Acme Trading Co.");
$mpdf->SetWatermarkText("Paid");
$mpdf->showWatermarkText = true;
$mpdf->watermark_font = 'DejaVuSansCondensed';
$mpdf->watermarkTextAlpha = 0.1;
$mpdf->SetDisplayMode('fullpage');
// Write HTML and output PDF
$mpdf->WriteHTML($html);
$mpdf->Output();
`
Beta Was this translation helpful? Give feedback.
All reactions