Hi, struggling to find new documentation for mpdf for php 7.1 would like to convert my previous version to the php 7 version.
OLD way:
$mpdf = new mPDF('','', 0, '', 15, 15, 16, 16, 9, 9, 'L');
New Class config(doesnt work):
$mpdf = new \Mpdf\Mpdf('','', 0, '', 15, 15, 16, 16, 9, 9, 'L');
I assume there is a new method of setting these parameters but the docs use the old method. Can someone point me in the right direction.
You should pass the configuration in an array now! Like this:
$this->_mPDF = new \Mpdf\Mpdf(array('mode' => 'utf-8', 'format' => 'A4'));
Thankyou @blekerfeld
You can find WIP documentation for mPDF 7.0 in the Github pages repo https://github.com/mpdf/mpdf.github.io - default development branch.
@finwe @blekerfeld Thankyou works now(using above old style)
$page_config = array(
'mode' => '',
'format' => '',
'default_font_size' => '0',
'$default_font'=> '',
'margin_left' => '15',
'margin_right'=>'15',
'margin_top' => '16',
'margin_bottom' => '16',
'margin_header'=>'9',
'margin_footer' =>'9',
'orientation' => 'L'
);
$mpdf = new \Mpdf\Mpdf($page_config);
Most helpful comment
You should pass the configuration in an array now! Like this:
$this->_mPDF = new \Mpdf\Mpdf(array('mode' => 'utf-8', 'format' => 'A4'));