How to add border bottom for last row of table in each page in mpdf and extend last row to the footer

I created the invoice with mpdf in laravel with HTML table with header and footer if the table reaches the footer it breaks automatically but it look like thisNo border bottom at last row

but i need the border bottom of last row in each page how to do it?

And also i need to extend the last row height to start of the footer in each page.