From 86462e6e42fd399e1b461c57c3a8697f8f5f47e7 Mon Sep 17 00:00:00 2001 From: andrewpthompson Date: Wed, 22 Aug 2018 10:24:49 +0930 Subject: [PATCH] Added comment explaining paddingLeft --- CRM/Utils/PDF/Label.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CRM/Utils/PDF/Label.php b/CRM/Utils/PDF/Label.php index b05b42d064..c481ea200b 100644 --- a/CRM/Utils/PDF/Label.php +++ b/CRM/Utils/PDF/Label.php @@ -184,6 +184,8 @@ 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 - 2 * $this->paddingLeft, 'h' => 0, -- 2.25.1