uppercese category qoshildi

This commit is contained in:
2026-04-07 12:36:14 +05:00
parent 48d96f32c1
commit 9d348f3e3a

View File

@@ -99,15 +99,17 @@ class ConclusionController extends Controller
$pdf->useTemplate($tpl); $pdf->useTemplate($tpl);
if ($i === 1) { if ($i === 1) {
// First page: top-right, inside the frame // First page: top-right, 30mm
$qrX = $size2['width'] - $qrSize - 18; $sz = 30;
$qrX = $size2['width'] - $sz - 18;
$qrY = 18; $qrY = 18;
} else { } else {
// Other pages: bottom-right, pushed to very bottom // Other pages: bottom-right, 22mm, very bottom
$qrX = $size2['width'] - $qrSize - 8; $sz = 22;
$qrY = $size2['height'] - $qrSize - 2; $qrX = $size2['width'] - $sz - 8;
$qrY = $size2['height'] - $sz - 2;
} }
$pdf->Image($qrPath, $qrX, $qrY, $qrSize, $qrSize); $pdf->Image($qrPath, $qrX, $qrY, $sz, $sz);
} }
// Append certificates from the database // Append certificates from the database
@@ -123,12 +125,12 @@ class ConclusionController extends Controller
$sizeCert = $pdf->getTemplateSize($tplCert); $sizeCert = $pdf->getTemplateSize($tplCert);
$pdf->AddPage($sizeCert['orientation'], [$sizeCert['width'], $sizeCert['height']]); $pdf->AddPage($sizeCert['orientation'], [$sizeCert['width'], $sizeCert['height']]);
$pdf->useTemplate($tplCert); $pdf->useTemplate($tplCert);
$pdf->Image($qrPath, $sizeCert['width'] - $qrSize - 8, $sizeCert['height'] - $qrSize - 2, $qrSize, $qrSize); // bottom-right $pdf->Image($qrPath, $sizeCert['width'] - 22 - 8, $sizeCert['height'] - 22 - 2, 22, 22); // bottom-right
} }
} elseif (in_array($extCert, ['jpg', 'jpeg', 'png'])) { } elseif (in_array($extCert, ['jpg', 'jpeg', 'png'])) {
$pdf->AddPage('P', 'A4'); $pdf->AddPage('P', 'A4');
$pdf->Image($certPath, 0, 0, 210, 297); $pdf->Image($certPath, 0, 0, 210, 297);
$pdf->Image($qrPath, 210 - $qrSize - 8, 297 - $qrSize - 2, $qrSize, $qrSize); // bottom-right, inside frame $pdf->Image($qrPath, 210 - 22 - 8, 297 - 22 - 2, 22, 22); // bottom-right, inside frame
} }
} }
} }