mPDF

Page Orientation

Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci.

Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi.

Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis.

Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.


'; //============================================================== //============================================================== //============================================================== include("../mpdf.php"); $mpdf=new mPDF('c','A4','','',42,15,67,67,20,15); $mpdf->SetDisplayMode('fullpage','two'); $mpdf->mirrorMargins = 1; $header = '
Left header p {PAGENO} Right header
'; $headerE = '
Outer header Inner header p {PAGENO}
'; $longfooter = '
Left footer p {PAGENO} Right footer
'; $longfooterE = '
Outer footer Inner footer p {PAGENO}
'; $footer = '
{DATE j-m-Y} » {PAGENO} » My document
'; $footerE = '
Even page footer - {PAGENO} -
'; $shortheader = '
{DATE j-m-Y} » {PAGENO} » My document
'; $shortheaderE = '
Even page header - {PAGENO} -
'; $mpdf->SetHTMLHeader($header); $mpdf->SetHTMLHeader($headerE,'E'); $mpdf->setFooter('{PAGENO} of {nbpg} pages||{PAGENO} of {nbpg} pages') ; $mpdf->WriteHTML($html); $mpdf->setHeader(); // Clear headers before adding page $mpdf->AddPage('L','','','','',25,25,55,45,18,12); $mpdf->SetHTMLHeader($shortheader,'',true); // New parameter in v1.4 to add the header to the new page $mpdf->SetHTMLHeader($shortheaderE,'E',true); $mpdf->SetHTMLFooter($longfooter); $mpdf->SetHTMLFooter($longfooterE,'E'); $mpdf->WriteHTML($html); $mpdf->WriteHTML($html); $mpdf->WriteHTML($html); $mpdf->setHeader('{PAGENO} of {nbpg} pages||{PAGENO} of {nbpg} pages') ; $mpdf->SetHTMLFooter($footer); $mpdf->SetHTMLFooter($footerE,'E'); $mpdf->WriteHTML($html); $mpdf->WriteHTML($html); $mpdf->setHeader(); // Clear headers before adding page $mpdf->AddPage('','','','','',42,15,67,67,20,15); // Default is Portrait (because that was the document default) $mpdf->SetHTMLHeader($shortheader,'',true); // New parameter in v1.4 to add the header to the new page $mpdf->SetHTMLHeader($shortheaderE,'E',true); $mpdf->SetHTMLFooter($longfooter); $mpdf->SetHTMLFooter($longfooterE,'E'); $mpdf->WriteHTML($html); $mpdf->WriteHTML($html); $mpdf->SetHTMLHeader($header); $mpdf->SetHTMLHeader($headerE,'E'); $mpdf->SetHTMLFooter($footer); $mpdf->SetHTMLFooter($footerE,'E'); $mpdf->WriteHTML($html); $mpdf->WriteHTML($html); $mpdf->Output('mpdf.pdf','I'); exit; //============================================================== //============================================================== //============================================================== ?>