From 8b5dac1ed9fa8549552efb38cb23a4f75439e772 Mon Sep 17 00:00:00 2001 From: kurund Date: Mon, 7 Oct 2013 16:16:35 +0100 Subject: [PATCH] add extra spacing between cells for few badge formats CRM-13329 ---------------------------------------- * CRM-13329: Add 2 more rows to the Badge Layout form (for a total of 6 rows) http://issues.civicrm.org/jira/browse/CRM-13329 --- CRM/Badge/BAO/Badge.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CRM/Badge/BAO/Badge.php b/CRM/Badge/BAO/Badge.php index 4f067382aa..18bda0445d 100644 --- a/CRM/Badge/BAO/Badge.php +++ b/CRM/Badge/BAO/Badge.php @@ -141,14 +141,18 @@ class CRM_Badge_BAO_Badge { public function generateLabel($formattedRow) { switch ($formattedRow['labelFormat']) { + case 'A6 Badge Portrait 150x106': + case 'Hanging Badge 3-3/4" x 4-3"/4': + self::labelCreator($formattedRow, 5); + break; case 'Avery 5395': default: - self::labelAvery5395($formattedRow); + self::labelCreator($formattedRow); break; } } - public function labelAvery5395(&$formattedRow) { + public function labelCreator(&$formattedRow, $cellspacing = 0) { $this->lMarginLogo = 18; $this->tMarginName = 20; @@ -190,7 +194,7 @@ class CRM_Badge_BAO_Badge { $value = $formattedRow['token'][$i]['value']; } - $offset = $this->pdf->getY() + $startOffset; + $offset = $this->pdf->getY() + $startOffset + $cellspacing; $this->pdf->SetFont($formattedRow['token'][$i]['font_name'], $formattedRow['token'][$i]['font_style'], $formattedRow['token'][$i]['font_size']); -- 2.25.1