Please help me to figure out what could be the issue with the following function.
public function generateProformaPdf()
{
$bookings = Booking::all();
$date = Carbon::now()->toDateString();
foreach($bookings as $booking){
$filename = $booking->id.'--'.$date.".pdf";
$invoice = SnappyPdf::loadview('pdf.proforma_invoice', compact('booking'));
$invoice->save(storage_path("app/public/invoices/proformainvoices/", $filename));
$proformaInvoice = new ProformaInvoice();
$proformaInvoice->file = $filename;
$proformaInvoice->save();
}
}
The above function generates following RunTimeException
he exit status code '1' says something went wrong: stderr: "Loading
pages (1/6) [> ] 0% [======> ] 10% [==============================> ]
50% [============================================================] 100%
QPainter::begin(): Returned false Error: Unable to write to destination
Exit with code 1, due to unknown error. " stdout: "" command:
/usr/local/bin/wkhtmltopdf --lowquality
'/var/tmp/knp_snappy5bbdf5bc3f1978.38608827.html'
'/storage/app/public/invoices/proformainvoices/'.
All the other functions using SnappyPdf work ok.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire