Reputation: 157
I need your help to fix this:
My current code is this:
<?php
require_once '../dompdf/autoload.inc.php';
use Dompdf\Dompdf;
$dompdf = new Dompdf();
$html = 'Insert full HTML content';
$dompdf->loadHtml($html);
$dompdf->setPaper('A4', 'landscape');
$dompdf->render();
$dompdf->stream("codexworld",array("Attachment"=>0));
?>
Why if I have exactly the same code like the basic example, am I getting this error? What am I missing? I don't find in my folder the Autoloader.php, where do I have to get that file?
Upvotes: 0
Views: 3554
Reputation: 2023
Well apparently it's an issue after domPdf has moved to Github. It seems that php-font-lib library doesn't exist. So one solution is to manually download it:
or you can check this answer here
Upvotes: 3