fix attendance

This commit is contained in:
root
2026-06-04 20:49:14 -04:00
parent 6fa656bb6c
commit d28d11e2e5
15 changed files with 1101 additions and 44 deletions
+9 -8
View File
@@ -101,14 +101,8 @@ class BadgePdfService
}
try {
$binary = $this->renderWithDompdf(
$rows,
$schoolName,
$motto,
$footerBlock
);
} catch (Throwable) {
// Keep the fixed-coordinate FPDF renderer as a fallback when Dompdf fails.
// Dompdf is substantially heavier here and can fatally exhaust memory on larger badge runs.
// Prefer the fixed-coordinate FPDF renderer first, and keep Dompdf only as a secondary fallback.
$binary = $this->renderWithFpdf(
$rows,
$schoolName,
@@ -117,6 +111,13 @@ class BadgePdfService
$footerBlock,
$logoPath
);
} catch (Throwable) {
$binary = $this->renderWithDompdf(
$rows,
$schoolName,
$motto,
$footerBlock
);
}
$logIds = array_values(array_unique(array_merge($studentIds, $userIds)));