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?
composer.json:
"require": {
"php": ">=7.1.3",
"alaouy/youtube": "^2.2",
"anhskohbo/no-captcha": "3.*",
"anlutro/l4-settings": "^0.4.6",
"aws/aws-sdk-php-laravel": "~3.0",
"components/jquery": "^3.3",
"components/jqueryui": "^1.12",
"danielstjules/stringy": "^3.1",
"fideloper/proxy": "~4.0",
"hashids/hashids": "^3.0",
"hazestudio/laravel-gopay-sdk": "^0.1.5",
"illuminate/support": "5.7.0",
"intervention/image": "^2.3",
"jenssegers/agent": "^2.5",
"kylekatarnls/laravel-carbon-2": "^1.0.0",
"laracasts/presenter": "^0.2.1",
"laravel/framework": "^5.7.0",
"laravel/socialite": "^3.0",
"laravelcollective/html": "^5.1",
"league/fractal": "^0.16.0",
"mpdf/mpdf": "^8.0",
"nesbot/carbon": "2.0.0-beta2 as 1.26.3",
"paragonie/random_compat": "~1.4",
"predis/predis": "^1.1",
"proengsoft/laravel-jsvalidation": "2.3.*",
"tymon/jwt-auth": "1.0.0-rc.3",
"webpatser/laravel-countries": "dev-master"
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Es54aZ
via IFTTT
Aucun commentaire:
Enregistrer un commentaire