Open zoran-grujic opened 5 years ago
Just to confirm, I managed to make it work with mpdf v7.1.9. It was required to change single line in PdfResponseFormatter.php
:
protected function formatPdf($response) { $mpdf = new \Mpdf\Mpdf([$this->mode, $this->format, $this->defaultFontSize, $this->defaultFont, $this->marginLeft, $this->marginRight, $this->marginTop, $this->marginBottom, $this->marginHeader, $this->marginFooter, $this->orientation ]);
NOTE: class name: \Mpdf\Mpdf constructor accepts array: [$this->mode, $this->format, ... ], there are '[' and ']' around parameter list.
I wanted to use PHP 7+ and I stumbled into a problem. It is required to use mpdf v7 with PHP 7+ and yii2-pdf does not support mpdf v7+. Is there will to update the yii2-pdf? It seems like the change is rather trivial according to: https://harrybailey.com/2018/08/yii-1-php-7-1-yii-pdf-and-mpdf/