Headers and footers aren't printed until the page is ended, which is normally called when you add a new page with Addpage(); So you should end the page manually and then turn headers/footers back on.
if($data['voucher']===0){
$pdf->AddPage();
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetXY(0, 10);
$pdf->create_invoice();
$pdf->Endpage(); //END THE PAGE AND TURN HEADERS/FOOTERS BACK ON
$pdf->setPrintHeader(true);
$pdf->setPrintFooter(true);
}
//CUSTOM CONTENT
//END
$pdf->Addpage(); // Any new page created now will again have headers footers