Update Req LOG Template

This commit is contained in:
ivan-sim
2023-12-27 16:11:07 +07:00
parent 841b319aeb
commit 9dc60b9141
4 changed files with 533 additions and 3 deletions

View File

@@ -292,18 +292,26 @@ class RequestLogController extends Controller
$options = new Options();
$options->set('isHtml5ParserEnabled', true);
$options->set('isPhpEnabled', true);
$options->set(['isRemoteEnabled' => true]);
$pdf->setOptions($options);
$html = view('pdf.view', $data);
$pdf->loadHtml($html);
// Halaman 1
$html1 = view('pdf.req_log_page_1', $data);
// Halaman 2
$html2 = view('pdf.req_log_page_2', $data);
// Gabung konten HTML dari dua tampilan
$htmlCombined = $html1 . $html2;
$pdf->loadHtml($htmlCombined);
$pdf->render();
$headers = [
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'inline; filename="file.pdf"',
];
return response($pdf->output(), 200, $headers);
}
}