You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use a template for creating PDF's. I can get this working for second and later pages.
$pdf = PDF::loadView('pdf.reportScan.test', $valueArray);
$instance = $pdf->getMpdf(); // get instance
$instance->SetDocTemplate(storage_path('template/sjabloon.pdf'), true);
$instance->AddPage(); // add new page with landscape orientation
$instance->WriteHTML(View::make('pdf.reportScan.aScan', $valueArray)->render()); // set page from view with data
$filename = "TempFileAscan $lastNameClient .pdf";
$pdf->save(storage_path( "$filename"));
return response()->download(storage_path("$filename"))->deleteFileAfterSend(true);
In this way I am creating two separate parts to get this working
But is there way to get the instance before the loadView.
Or maybe yuo have an other solution?
Thanks is advance
Eric
The text was updated successfully, but these errors were encountered:
Hi Carlos,
I want to use a template for creating PDF's. I can get this working for second and later pages.
In this way I am creating two separate parts to get this working
But is there way to get the instance before the loadView.
Or maybe yuo have an other solution?
Thanks is advance
Eric
The text was updated successfully, but these errors were encountered: