src/Pdf/PdfWriter.php
public function getPdf(bool $init = false): Mpdf
    {
        $this->pdf = (null === $this->pdf || true === $init) ? new Mpdf($this->config) : $this->pdf;

        return $this->pdf;
    }
public function getPdf(bool $init = false): Mpdf
    {
        $this->pdf = (null === $this->pdf || true === $init) ? new Mpdf($this->config) : $this->pdf;

        return $this->pdf;
    }
public function getPdf ( bool $ init = false ) : Mpdf { $ this -> pdf = ( null === $ this -> pdf || true === $ init ) ? new Mpdf ( $ this -> config ) : $ this -> pdf ; return $ this -> pdf ; }
Get current pdf object.

@param bool $init Set true if you want to create a new pdf regardless there is always an existing pdf

@return Mpdf
Get current pdf object .