add test batches

This commit is contained in:
root
2026-06-08 23:45:55 -04:00
parent c792b8be05
commit 8d4d610b82
1480 changed files with 22587 additions and 10762 deletions
@@ -8,7 +8,9 @@ use Dompdf\Options;
class SlipPrinterPdfService
{
public function __construct(private SlipPrinterConfigService $configService) {}
public function __construct(private SlipPrinterConfigService $configService)
{
}
public function render(array $data, array $lines, array $options = []): array
{
@@ -61,7 +63,7 @@ class SlipPrinterPdfService
'h_mm' => $hMm,
]);
$optionsObj = new Options;
$optionsObj = new Options();
$optionsObj->set('isRemoteEnabled', true);
$optionsObj->set('defaultFont', 'Courier');
@@ -74,7 +76,7 @@ class SlipPrinterPdfService
$dompdf->setPaper([0, 0, $wPt, $hPt]);
$dompdf->render();
$filename = 'LateSlip_'.preg_replace('/[^A-Za-z0-9]+/', '_', (string) ($data['student_name'] ?? 'slip')).'_'.date('Ymd_His').'.pdf';
$filename = 'LateSlip_' . preg_replace('/[^A-Za-z0-9]+/', '_', (string) ($data['student_name'] ?? 'slip')) . '_' . date('Ymd_His') . '.pdf';
return [
'content' => $dompdf->output(),