+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* functionality and smarts to the base PDF_Label.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
*/
/**
* @param string $text
*/
public function generateLabel($text) {
+ // paddingLeft is used for both left & right padding so needs to be
+ // subtracted twice from width to get the width that is available for text
$args = array(
- 'w' => $this->width,
+ 'w' => $this->width - 2 * $this->paddingLeft,
'h' => 0,
'txt' => $text,
'border' => 0,