fix the event print and certificate qr

This commit is contained in:
root
2026-05-21 17:00:38 -04:00
parent 3333e71c94
commit 239d35f8ff
7 changed files with 502 additions and 276 deletions
@@ -308,11 +308,11 @@ class CertificateController extends BaseController
$pdf->Image($imgDir . 'background.png', 280, 176, 291, 340);
$pdf->Image($imgDir . 'signature.png', 140, 399, 90, 90);
// ── QR code — small, bottom-right, just above the certificate number
// ── QR code — bottom-right corner: 1.5 cm from bottom, 2.5 cm from right
$qrSize = 42; // pt
if ($qrFile !== null && file_exists($qrFile)) {
$qrX = $W - 10 - $qrSize; // right-aligned with the cert number text
$qrY = $H - 14 - 3 - $qrSize; // 3 pt gap above the cert number line
$qrX = $W - 70.87 - $qrSize; // 2.5 cm from right edge
$qrY = $H - 42.52 - $qrSize; // 1.5 cm from bottom edge
$pdf->Image($qrFile, $qrX, $qrY, $qrSize, $qrSize);
}
@@ -371,12 +371,12 @@ class CertificateController extends BaseController
$pdf->SetXY(106, 492);
$pdf->Cell(168, 20, 'Signature', 0, 0, 'C');
// ── Certificate number — bottom-right, small gray
// ── Certificate number — 1.4 cm from bottom, 2.5 cm from left
if ($certNumber !== '') {
$pdf->SetFont('helvetica', '', 8);
$pdf->SetTextColor(150, 150, 150);
$pdf->SetXY(0, $H - 14);
$pdf->Cell($W - 10, 12, 'Certificate No. ' . $certNumber, 0, 0, 'R');
$pdf->SetXY(70.87, $H - 39.68);
$pdf->Cell(200, 12, 'Certificate No. ' . $certNumber, 0, 0, 'L');
$pdf->SetTextColor(0, 0, 0);
}
}