Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Customize Content not over Header and Footer in TCPDF

I already able to set up Header and Footer.

But, my content by writeHTMLCell cannot fit into the page properly, footer is overlay the content.

using A4 size, Header is 35% height; Content is 50% height; and Footer is 15% height.

I do not know how to set the Content's height to be 50% in all page.

like image 668
PGoldHow Avatar asked Jan 25 '26 12:01

PGoldHow


1 Answers

The solution is $pdf->SetAutoPageBreak(true, 55);

Original is $pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);

Set value in PDF_MARGIN_BOTTOM will do.

like image 66
PGoldHow Avatar answered Jan 28 '26 01:01

PGoldHow



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!