polin
polin

Reputation: 2845

Why MPDF library is always shrinking to single page?

I am using MPDF. My content of the page is dynamic. So even if the content enhances it doesn't make a page break. Rather the content shrinks and font size becomes smaller.

$mpdf = new \Mpdf\Mpdf();
$mpdf->SetDisplayMode('default');
$mpdf->WriteHTML($htmldata);
$mpdf->Output($name,"D");

Here $htmldata is my dynamic long html variable. Here's the sample of the pdf enter link description here

Upvotes: 1

Views: 1461

Answers (1)

Finwe
Finwe

Reputation: 6745

mPDF resizes tables so that their parts fit the page.

See https://mpdf.github.io/troubleshooting/resizing.html

Use <table autosize="0"> to prevent most of this behaviour.

Upvotes: 2

Related Questions