After updating PHP on the server to version 7.3.1 and mpdf to version 8, pdf is not generated. Folders attributes for mpdf -> 755
Code:
use Mpdf\Mpdf;
require_once __DIR__ . '/vendor/autoload.php';
$pdf = new \Mpdf\Mpdf(['tempDir' => $_SERVER["DOCUMENT_ROOT"].'/assets/temp']);
$pdf->SetDisplayMode('fullpage');
$pdf->SetProtection(array('print'));
$stylesheet = file_get_contents($_SERVER['DOCUMENT_ROOT'].'/assets/css/invoice.css');
$pdf->WriteHTML($stylesheet,1);
$pdf->WriteHTML($html_invoice,2);
$pdf_path = $_SERVER['DOCUMENT_ROOT'].'/assets/invoices/'.$invoice_id.'_'.$this->getPaymentSessionId().'.pdf';
$pdf->Output($pdf_path,"F");
is there anything else that needs to change from version 7?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire