Edit _bulk_print_badges.php via Editor

This commit is contained in:
Flatlogic Bot 2026-01-12 08:47:01 +00:00
parent 9cbec6a128
commit 4e5ed7affc

View File

@ -53,29 +53,21 @@ class PDF extends tFPDF
function generateBadge($person) { function generateBadge($person) {
$this->AddPage(); $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->Cell(0, 20, $person['first_name'] . ' ' . $person['last_name'], 0, 1, 'C');
$this->Ln(10); $this->SetFont('DejaVu', '', 12);
$this->Cell(0, 10, $person['company_name'] ?? 'N/A', 0, 0, 'C');
$this->SetFont('DejaVu', '', 16); $this->SetFont('DejaVu', '', 8);
$this->Cell(0, 10, $person['industry'] ?? 'N/A', 0, 0, 'C');
$details = [ $this->SetXY(1,1);
'Firma:' => $person['company_name'], $this->SetFont('DejaVu', '', 6);
'Branża:' => $person['industry'], $this->Cell(0, 10, $person['bni_group_name'] ?? 'N/A', 0, 0, 'C');
'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);
}
} }
} }
$pdf = new PDF(); $pdf = new PDF('L', 'mm', array(85, 55));
foreach ($peopleDetails as $person) { foreach ($peopleDetails as $person) {
// No need for converting the entire array, FPDF with iconv handles it. // No need for converting the entire array, FPDF with iconv handles it.