Fix long address lines overflowing label
authorandrewpthompson <andrewpthompson@users.noreply.github.com>
Mon, 20 Aug 2018 01:22:34 +0000 (10:52 +0930)
committerGitHub <noreply@github.com>
Mon, 20 Aug 2018 01:22:34 +0000 (10:52 +0930)
generateLabel() - Width did not take into account paddingLeft

CRM/Utils/PDF/Label.php

index 0f6a613feb8c35815e0a63bea435fecc864a806b..b05b42d06454c62bec1ca673d0161f0e8c426986 100644 (file)
@@ -185,7 +185,7 @@ class CRM_Utils_PDF_Label extends TCPDF {
    */
   public function generateLabel($text) {
     $args = array(
-      'w' => $this->width,
+      'w' => $this->width - 2 * $this->paddingLeft,
       'h' => 0,
       'txt' => $text,
       'border' => 0,