X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FPDF%2FLabel.php;h=b2f9c977514bcfdda78de1672dcd9d9cfed06381;hb=8dc65d88b293208aab284087ae65e2beae4bb3de;hp=0f6a613feb8c35815e0a63bea435fecc864a806b;hpb=58d4a38f6dbe9137ab5a4fe8333e1304ae6228a3;p=civicrm-core.git diff --git a/CRM/Utils/PDF/Label.php b/CRM/Utils/PDF/Label.php index 0f6a613feb..b2f9c97751 100644 --- a/CRM/Utils/PDF/Label.php +++ b/CRM/Utils/PDF/Label.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2018 | + | Copyright CiviCRM LLC (c) 2004-2019 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -30,7 +30,7 @@ * functionality and smarts to the base PDF_Label. * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2018 + * @copyright CiviCRM LLC (c) 2004-2019 */ /** @@ -184,8 +184,10 @@ class CRM_Utils_PDF_Label extends TCPDF { * @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,