3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.4 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2013 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
31 * @copyright CiviCRM LLC (c) 2004-2013
36 class CRM_Badge_Format_Avery5395
extends CRM_Badge_Format_Badge
{
37 public function generateLabel($participant) {
38 $this->lMarginLogo
= 20;
39 $this->tMarginName
= 20;
41 $x = $this->pdf
->GetAbsX();
42 $y = $this->pdf
->GetY();
44 $this->printImage($participant['image_1']);
46 $this->pdf
->SetLineStyle(array('width' => 0.1, 'cap' => 'round', 'join' => 'round', 'dash' => '2,2', 'color' => array(0, 0, 200)));
48 $this->pdf
->SetFontSize(9);
49 $this->pdf
->MultiCell($this->pdf
->width
- $this->lMarginLogo
, 0, $participant['token'][1]['value'], $this->border
, "L", 0, 1, $x +
$this->lMarginLogo
, $y);
51 $this->pdf
->SetFontSize(20);
52 $this->pdf
->MultiCell($this->pdf
->width
, 10, $participant['token'][2]['value'], $this->border
, "C", 0, 1, $x, $y +
$this->tMarginName
);
53 $this->pdf
->SetFontSize(15);
54 $this->pdf
->MultiCell($this->pdf
->width
, 0, $participant['token'][3]['value'], $this->border
, "C", 0, 1, $x, $this->pdf
->getY());
56 $this->pdf
->SetFontSize(9);
57 $this->pdf
->SetXY($x, $y +
$this->pdf
->height
- 5);
58 $date = CRM_Utils_Date
::customFormat($participant['token'][4]['value'], "%e %b");
59 $this->pdf
->Cell($this->pdf
->width
, 0, $date, $this->border
, 2, "R");