fix(penilai/surveyor): perbaikkan print out dokument jaminan

This commit is contained in:
majid
2025-03-08 01:12:52 +07:00
parent 5300254a6d
commit 935529562a
26 changed files with 504 additions and 1545 deletions

View File

@@ -1290,6 +1290,8 @@ class PenilaiController extends Controller
// return $pdf;
$cleanNomorLaporan = str_replace(['/', '\\'], '-', $nomorLaporan);
$pdf->setPaper('A4', 'portrait');
$pdf->set_option('isHtml5ParserEnabled', true);
$pdf->set_option('isPhpEnabled', true);
return response($pdf->output(), 200)
->header('Content-Type', 'application/pdf')
->header('Content-Disposition', 'inline; filename="Laporan_' . $tipeLaporan . '_' . $permohonan->debiture->name . '_' . $cleanNomorLaporan . '.pdf"');
@@ -1317,6 +1319,8 @@ class PenilaiController extends Controller
// return $pdf;
$cleanNomorLaporan = str_replace(['/', '\\'], '-', $nomorLaporan);
$pdf->setPaper('A4', 'portrait');
$pdf->set_option('isHtml5ParserEnabled', true);
$pdf->set_option('isPhpEnabled', true);
return $pdf->download('Laporan_' . $tipeLaporan . '_' . $permohonan->debiture->name . '_' . $cleanNomorLaporan . '_data.pdf');
}
} catch (\Exception $e) {