Service/MpdfService.php
public function getMpdf($constructorArgs = array()) 
    {
        $allConstructorArgs = $constructorArgs;
	    if($this->getAddDefaultConstructorArgs()) {
	        $allConstructorArgs = array(array_merge(array('utf-8', 'A4'), $allConstructorArgs));
	    }		

        $reflection = new \ReflectionClass('Mpdf\Mpdf');
        $mpdf = $reflection->newInstanceArgs($allConstructorArgs);

        return $mpdf;
    }
public function getMpdf($constructorArgs = array()) 
    {
        $allConstructorArgs = $constructorArgs;
	    if($this->getAddDefaultConstructorArgs()) {
	        $allConstructorArgs = array(array_merge(array('utf-8', 'A4'), $allConstructorArgs));
	    }		

        $reflection = new \ReflectionClass('Mpdf\Mpdf');
        $mpdf = $reflection->newInstanceArgs($allConstructorArgs);

        return $mpdf;
    }
public function getMpdf ( $ constructorArgs = array ( ) ) { $ allConstructorArgs = $ constructorArgs ; if ( $ this -> getAddDefaultConstructorArgs ( ) ) { $ allConstructorArgs = array ( array_merge ( array ( 'utf-8' , 'A4' ) , $ allConstructorArgs ) ) ; } $ reflection = new \ ReflectionClass ( 'Mpdf\Mpdf' ) ; $ mpdf = $ reflection -> newInstanceArgs ( $ allConstructorArgs ) ; return $ mpdf ; }
Get an instance of mPDF class
@param array $constructorArgs arguments for mPDF constror
@return \mPDF
Get an instance of mPDF class