0

can anyone tell me on how could I change the page size on the second (2nd) page using mpdf. My page size is A4 (by mpdf default).

I want to dynamically changed the width of second page of my report since it's dynamic content of table (e.g. number of columns is undefined)

1 Answer 1

2

If you know where your first page ends, you can use the AddPage() function to change the formatting of the next page.

 $mpdf=new mPDF();
 $mpdf->WriteHTML('Your Introduction');
 $mpdf->AddPage('L','','','','',50,50,50,50,10,10);
 $mpdf->WriteHTML('Your Book text');
 $mpdf->AddPage('P','','','','',50,50,50,50,10,10);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.