TCPDF agregar html al header y footer

Filtramos la función del header y footer

class MYPDF extends TCPDF {
        public function Header() {
          $html = get_header_welcome();
          $this->writeHTMLCell($w = 0, $h = 50, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = false, $align = 'C', $autopadding = true);
          $this->setPageMark();
        }
        public function Footer() {
          $html = get_footer_welcome();					
          // get the current page break margin
          $bMargin = $this->getBreakMargin();
          // get current auto-page-break mode
          $auto_page_break = $this->AutoPageBreak;
          // disable auto-page-break
          $this->SetAutoPageBreak(false, 0);
          // write html image
          $this->writeHTMLCell($w = 0, $h = 50, $x = '', $y = '', $html, $border = 0, $ln = 0, $fill = 0, $reseth = false, $align = 'C', $autopadding = false);
          // restore auto-page-break status
          $this->SetAutoPageBreak($auto_page_break, $bMargin);
          // set the starting point for the page content
          $this->setPageMark();					
        }
      }

Invocamos nuestra clase para crear el PDF

$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);