title: TCPDF no footer on page if condition is met?
body: <p>I am trying to set a conditional statement where a footer is set or not.</p>
  
  <pre><code>    if($data['voucher']===0){
          $pdf-&gt;setPrintHeader(false);
          $pdf-&gt;setPrintFooter(false);
          $pdf-&gt;AddPage();
          $pdf-&gt;SetXY(0, 10);
  
          $pdf-&gt;create_invoice();
      }
      //CUSTOM CONTENT
      //END 
      $pdf-&gt;setPrintHeader(true);
      $pdf-&gt;setPrintFooter(true);
  </code></pre>
  
  <p>But the footer is still set. However if I set </p>
  
  <pre><code>$pdf-&gt;setPrintHeader(true);
  </code></pre>
  
  <p>the header is set but footer doesn't react. </p>
  
  <p>The <code>Header()</code> and the <code>Footer()</code> functions - are defined in an extended class.</p>