uppercese category qoshildi
This commit is contained in:
@@ -99,15 +99,17 @@ class ConclusionController extends Controller
|
||||
$pdf->useTemplate($tpl);
|
||||
|
||||
if ($i === 1) {
|
||||
// First page: top-right, inside the frame
|
||||
$qrX = $size2['width'] - $qrSize - 18;
|
||||
// First page: top-right, 30mm
|
||||
$sz = 30;
|
||||
$qrX = $size2['width'] - $sz - 18;
|
||||
$qrY = 18;
|
||||
} else {
|
||||
// Other pages: bottom-right, pushed to very bottom
|
||||
$qrX = $size2['width'] - $qrSize - 8;
|
||||
$qrY = $size2['height'] - $qrSize - 2;
|
||||
// Other pages: bottom-right, 22mm, very bottom
|
||||
$sz = 22;
|
||||
$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
|
||||
@@ -123,12 +125,12 @@ class ConclusionController extends Controller
|
||||
$sizeCert = $pdf->getTemplateSize($tplCert);
|
||||
$pdf->AddPage($sizeCert['orientation'], [$sizeCert['width'], $sizeCert['height']]);
|
||||
$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'])) {
|
||||
$pdf->AddPage('P', 'A4');
|
||||
$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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user