Only put bottom line if footer text is available - pdf
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 19 Sep 2018 19:30:18 +0000 (15:30 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 19 Sep 2018 19:30:18 +0000 (15:30 -0400)
In the pdf only show the line within the footer text.

models/front/events/pdfCreator.php

index b1fa1c5..3fb0262 100644 (file)
@@ -44,10 +44,10 @@ $pdf->ezSetY( 840 );
 if ( $this->config['settings']['pdf_logo'] ) {
     $pdf->ezImage( GLM_MEMBERS_PLUGIN_MEDIA_PATH . '/images/large/' . $this->config['settings']['pdf_logo'], 0, 555, 'width', 'center' );
 }
-$pdf->setLineStyle( 1 );
-$pdf->setStrokeColor(0, 0, 0, 1);
-$pdf->line( 20, 40, $this->pdf_width, 40 );
 if ( $this->config['settings']['footer_text'] ) {
+    $pdf->setLineStyle( 1 );
+    $pdf->setStrokeColor(0, 0, 0, 1);
+    $pdf->line( 20, 40, $this->pdf_width, 40 );
     $footer_y = 30;
     // Break up the footer text by newlines and add each one
     $footer_text = explode( "\n", $this->config['settings']['footer_text'] );