I am using laravel 5.2, The dompdf runs fine at localhost when updated to aws it keeps showing ErrorException in Cpdf.php line 3855: Undefined index:, in this line (3855) has font variable.
Sample code :
$html = "<h2>Hello</h2>";
PDF::setOptions(['dpi' => 150, 'defaultFont' => 'sans-serif', 'currentFont' => 'sans-serif']);
$pdf = PDF::loadHTML($html)->setPaper('a4', 'landscape');
return $pdf->download('pdfview.pdf');
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2qyVx9j
via IFTTT
RépondreSupprimer0
down vote
ISSUE SOLVED FOR ME-> same problem arise for me even after deleting "dompdf_font_family_cache.php" from server or modifying "dompdf_font_family_cache.php" '/' to '\' from server in storage\fonts. BUT SOLVED -> after downloading latest Dompdf 0.8.0 (https://github.com/dompdf/dompdf/releases) and uploaded server in vendor folder