diff --git a/app/Services/PreviewLaporanService.php b/app/Services/PreviewLaporanService.php index d281e21..2a0dc11 100644 --- a/app/Services/PreviewLaporanService.php +++ b/app/Services/PreviewLaporanService.php @@ -347,6 +347,7 @@ class PreviewLaporanService $pdf->setPaper('A4', 'portrait'); $pdf->set_option('isHtml5ParserEnabled', true); $pdf->set_option('isPhpEnabled', true); + $pdf->set_option('dpi', '96'); return $pdf; } diff --git a/resources/views/penilai/components/foto-jaminan.blade.php b/resources/views/penilai/components/foto-jaminan.blade.php index 5689d79..3d0fba4 100644 --- a/resources/views/penilai/components/foto-jaminan.blade.php +++ b/resources/views/penilai/components/foto-jaminan.blade.php @@ -154,10 +154,12 @@ ? $fallbackPath : $originalPath; + $resizedPath = resize_image($pathToUse, 800, 400, 25); + $filePath = $statusLpj == 1 - ? storage_path('app/public/' . $pathToUse) - : asset('storage/' . $pathToUse); + ? storage_path('app/public/' . $resizedPath) + : asset('storage/' . $resizedPath); $extension = strtolower(pathinfo($pathToUse, PATHINFO_EXTENSION)); $isImage = in_array($extension, [ @@ -248,12 +250,16 @@ style="align-content: center; text-align: center; margin-bottom: 20px"> @foreach ($chunkedPhotos as $item) @php + $originalPath = $item['path']; + $resizedPath = resize_image($originalPath, 800, 400, 25); + + $filePath = $statusLpj == 1 - ? storage_path('app/public/' . $item['path']) - : asset('storage/' . $item['path']); + ? storage_path('app/public/' . $resizedPath) + : asset('storage/' . $resizedPath); - $extension = strtolower(pathinfo($item['path'], PATHINFO_EXTENSION)); + $extension = strtolower(pathinfo($originalPath, PATHINFO_EXTENSION)); $isImage = in_array($extension, [ 'jpg', 'jpeg',