I created mPDF in the landscape modus and I want to add a page with portrait orientation, but when I use $mpdf->addPage('p'); nothing happen. All following pages are in landscape.
Some of the options in mPDF are to allow backward compatibility, and some are just remnants of the original FPDF which haven't been removed.
To set Landscape so that mPDF knows it is landscape, either use the page format followed by '-L' e.g. $mpdf=new mPDF('','A4-L','','',15,15,20,20,5,5,''); [In this case, do not set the last parameter]
Or set an array (width first) and the last parameter $mpdf=new mPDF('',array(210,297),'','',15,15,20,20,5,5,'L');
Either of these should work when you use $mpdf->addPage('p');