3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
14 * Copyright (C) 2010 Tech To The People
15 * Licensed to CiviCRM under the Academic Free License version 3.0.
24 class CRM_Event_Badge_NameTent
extends CRM_Event_Badge
{
28 public function __construct() {
29 parent
::__construct();
35 $w = $pw - 2 * $this->lMargin
;
36 $h = $ph - 2 * $this->tMargin
;
51 // $this->setDebug ();
54 public function pdfExtraFormat() {
55 $this->pdf
->setPageFormat('A4', 'L');
59 * @param array $participant
61 protected function writeOneSide(&$participant) {
62 $this->pdf
->SetXY(0, $this->pdf
->height
/ 2);
63 $this->printBackground(TRUE);
64 $txt = $participant['display_name'];
65 $this->pdf
->SetXY(0, $this->pdf
->height
/ 2 +
20);
66 $this->pdf
->SetFontSize(54);
67 $this->pdf
->Write(0, $txt, NULL, NULL, 'C');
68 $this->pdf
->SetXY(0, $this->pdf
->height
/ 2 +
50);
69 $this->pdf
->SetFontSize(36);
70 $this->pdf
->Write(0, $participant['current_employer'], NULL, NULL, 'C');
74 * @param array $participant
76 public function generateLabel($participant) {
77 $this->writeOneSide($participant);
78 $this->pdf
->StartTransform();
79 $this->pdf
->Rotate(180, $this->pdf
->width
/ 2 +
$this->pdf
->marginLeft
, $this->pdf
->height
/ 2);
80 $this->writeOneSide($participant);
81 $this->pdf
->StopTransform();