Edit _bulk_print_badges.php via Editor
This commit is contained in:
parent
9cbec6a128
commit
4e5ed7affc
@ -53,29 +53,21 @@ class PDF extends tFPDF
|
||||
|
||||
function generateBadge($person) {
|
||||
$this->AddPage();
|
||||
$this->SetFont('DejaVu', 'B', 24);
|
||||
$this->Image('assets/pasted-20260112-081646-4e946aad.png', 0, 0, $this->GetPageWidth(), $this->GetPageHeight());
|
||||
$this->SetFont('DejaVu', 'B', 12);
|
||||
$this->Cell(0, 20, $person['first_name'] . ' ' . $person['last_name'], 0, 1, 'C');
|
||||
$this->Ln(10);
|
||||
|
||||
$this->SetFont('DejaVu', '', 16);
|
||||
$this->SetFont('DejaVu', '', 12);
|
||||
$this->Cell(0, 10, $person['company_name'] ?? 'N/A', 0, 0, 'C');
|
||||
$this->SetFont('DejaVu', '', 8);
|
||||
$this->Cell(0, 10, $person['industry'] ?? 'N/A', 0, 0, 'C');
|
||||
|
||||
$details = [
|
||||
'Firma:' => $person['company_name'],
|
||||
'Branża:' => $person['industry'],
|
||||
'Grupa BNI:' => $person['bni_group_name']
|
||||
];
|
||||
|
||||
foreach ($details as $label => $value) {
|
||||
$this->SetFont('DejaVu', 'B', 14);
|
||||
$this->Cell(40, 10, $label, 0, 0);
|
||||
$this->SetFont('DejaVu', '', 14);
|
||||
$this->Cell(0, 10, $value ?? 'N/A', 0, 1);
|
||||
$this->Ln(5);
|
||||
}
|
||||
$this->SetXY(1,1);
|
||||
$this->SetFont('DejaVu', '', 6);
|
||||
$this->Cell(0, 10, $person['bni_group_name'] ?? 'N/A', 0, 0, 'C');
|
||||
}
|
||||
}
|
||||
|
||||
$pdf = new PDF();
|
||||
$pdf = new PDF('L', 'mm', array(85, 55));
|
||||
|
||||
foreach ($peopleDetails as $person) {
|
||||
// No need for converting the entire array, FPDF with iconv handles it.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user