All my code now:
$phpdocx=new CreateDocxFromTemplate(ROOT_DIR.UPLOAD_DOCUMENTS_DIR.$document_source);
$phpdocx->importHeadersAndFooters(ROOT_DIR.UPLOAD_DOCUMENTS_DIR.$document_source);
$phpdocx->removeWordContent(array('type'=>'break'));
$content=new WordFragment($phpdocx,'document');
$content->addText('');
$phpdocx->replaceWordContent($content,array('type'=>'break'));
$phpdocx->removeHeaders();
$phpdocx->removeFooters();
$phpdocx->addBreak(array('type'=>'page'));
$phpdocx->embedHTML($add_text);
$numbering=new WordFragment($phpdocx,'defaultFooter');
$numbering->addPageNumber('numerical',array(
'textAlign'=>'right',
'bold'=>true,
'sz'=>14,
'color'=>'65a9ef',
));
$numbering->embedHTML($footer_html);
$phpdocx->addFooter(array('default'=>$numbering,'first'=>$numbering,'even'=>$numbering));
$phpdocx->createDocx(ROOT_DIR.UPLOAD_DOCUMENTS_DIR.$temp_name);
$phpdocx->transformDocument(ROOT_DIR.UPLOAD_DOCUMENTS_DIR.$temp_name,ROOT_DIR.UPLOAD_DOCUMENTS_DIR.$pdf_name);
$pdf_util=new PdfUtilities();
$pdf_util->addBackgroundImage(ROOT_DIR.UPLOAD_DOCUMENTS_DIR.$pdf_name,ROOT_DIR.UPLOAD_DOCUMENTS_DIR.$pdf_name,ROOT_DIR.IMAGES_SETTINGS_DIR.$settings['wtm'],array('height'=>'auto','width'=>'auto','opacity'=>0.1));