4 * Class CRM_Event_Badge_Logo5395
6 class CRM_Event_Badge_Logo5395
extends CRM_Event_Badge
{
10 function __construct() {
11 parent
::__construct();
17 $this->format
= array(
18 'name' => 'Avery 5395', 'paper-size' => 'A4', 'metric' => 'mm', 'lMargin' => 13.5,
19 'tMargin' => 3, 'NX' => 2, 'NY' => 4, 'SpaceX' => 15, 'SpaceY' => 8.5,
20 'width' => $w, 'height' => $h, 'font-size' => 12,
22 $this->lMarginLogo
= 20;
23 $this->tMarginName
= 20;
24 // $this->setDebug ();
30 public function generateLabel($participant) {
31 $x = $this->pdf
->GetAbsX();
32 $y = $this->pdf
->GetY();
33 $this->printBackground(TRUE);
34 $this->pdf
->SetLineStyle(array('width' => 0.1, 'cap' => 'round', 'join' => 'round', 'dash' => '2,2', 'color' => array(0, 0, 200)));
36 $this->pdf
->SetFontSize(9);
37 $this->pdf
->MultiCell($this->pdf
->width
- $this->lMarginLogo
, 0, $participant['event_title'], $this->border
, "L", 0, 1, $x +
$this->lMarginLogo
, $y);
39 $this->pdf
->SetXY($x, $y +
$this->pdf
->height
- 5);
40 $date = CRM_Utils_Date
::customFormat($participant['event_start_date'], "%e %b");
41 $this->pdf
->Cell($this->pdf
->width
, 0, $date, $this->border
, 2, "R");
43 $this->pdf
->SetFontSize(20);
44 $this->pdf
->MultiCell($this->pdf
->width
, 10, $participant['display_name'], $this->border
, "C", 0, 1, $x, $y +
$this->tMarginName
);
45 $this->pdf
->SetFontSize(15);
46 $this->pdf
->MultiCell($this->pdf
->width
, 0, $participant['current_employer'], $this->border
, "C", 0, 1, $x, $this->pdf
->getY());