infomf
infomf

Reputation: 167

Insert Footer/Header to pdf - PHP class mPDF

How do I insert a footer on all sides?

$mpdf->SetHTMLFooter($paticka);-> Inserted in the last side

Thanks in advance.

Upvotes: 2

Views: 8781

Answers (1)

Martin Mandl
Martin Mandl

Reputation: 731

You need to specify the page margin_bottom to leave enough room for the footer. margin_bottom is the distance in mm from the bottom of the page for text to force a new page. margin_footer is the distance in mm from the bottom of the page where the footer will be bottom-aligned.

$mpdf = new mPDF('', 'A4', '', '', $margin_left, $margin_right, $margin_top, $margin_bottom, $margin_header, $margin_footer);

http://mpdf.bpm1.com/forum/comments.php?DiscussionID=228

Edit: The above link appears to be old. I believe this is the new link: http://www.mpdf1.com/forum/discussion/228

Upvotes: 4

Related Questions