Closed lucapellegrino70 closed 1 year ago
How can I solve this?
Reading documentation, there was a major release
Also your code, it is very badly done, use markdown too
use Barryvdh\DomPDF\Facade\Pdf;
$pdf = Pdf::loadFile(public_path('templates/myfile.html'))
->setPaper('A4', 'portrait')
->save(public_path('templates/blabla.pdf'));
@parallels999 I already tried but still get error
Dompdf\Exception: Permission denied on \public\templates/myfile.html. The communication protocol is not supported. in file \vendor\dompdf\dompdf\src\Dompdf.php on line 350
Permission denied
Search for that, or ask on the real package, this is only a wrapper
thanks
same here
Hello, I am trying to convert html to pdf as follows:
use Barryvdh\DomPDF\Facade\Pdf;
$pdf = app()->make('dompdf.wrapper'); $pdf = \PDF::loadFile(public_path('templates/myfile.html)); $pdf->setPaper('A4', 'portrait'); $pdf->save(public_path('templates/blabla.pdf));
This code was working but since I updated Laravel and Barryvdh is not working anymore, it gives error in loadfile
How can I solve this?
Thank you