Hellow!
I want add water makr to footer for even page.
My frist variant is
$footerImage = new WordFragment($word,' defaultFooter');
$footerImage->addImage([
'src' => 'img/logo_blue_sidebar_en.png',
'height' => 50,
'width' => 150,
]);
$word->addFooter(['even' => $footerImage]);
$word->createDocx($documentName);
But after replace some elements to HTML this image in footer disappeared. If i set image to footer after replacing variables to HTML elements i can't add image to footer.
$htmlFontSize = '18.5px';
$docx = new CreateDocxFromTemplate($documentName.'.docx');
//ЗаменÑм Ð¿Ð¾Ð»Ñ Ð³Ð´Ðµ наш переменные на текÑÑ‚ где иÑпользовалоÑÑŒ CKEDITOR
$docx->replaceVariableByHTML('MEMBERSHIP', 'block', '<div style="font-size: '.$htmlFontSize.'; ">'.$membership.'</div>', ['isFile' => false, 'parseDivsAsPs' => true, 'downloadImages' => false]);
if($person->expertise_experience_has == 1)
$docx->replaceVariableByHTML('EXPERIENCE', 'block', '<div style="font-size: '.$htmlFontSize.'; ">'.$expertiseExperience.'</div>', ['isFile' => false, 'parseDivsAsPs' => true, 'downloadImages' => false]);
$docx->replaceVariableByHTML('PUBLICATIONS', 'block', '<div style="font-size: '.$htmlFontSize.'; ">'.$publications.'</div>', ['isFile' => false, 'parseDivsAsPs' => true, 'downloadImages' => false]);
$docx->replaceVariableByHTML('PATENTS', 'block', '<div style="font-size: '.$htmlFontSize.'; ">'.$receivedPatents.'</div>', ['isFile' => false, 'parseDivsAsPs' => true, 'downloadImages' => false]);
//Download
$docx->createDocxAndDownload($documentName);
unlink($documentName.'.docx');
On second variant i use:
//WaterMark
$waterMarkParams = [
'image' => 'img/logo_blue_sidebar_en.png',
'height' => 50,
'width' => 150,
'decolorate' => false,
];
$docx = new DocxUtilities();
$source = $documentName.'.docx';
$target = $documentName.'.docx';
$docx->watermarkDocx($source, $target, $type = 'image', $options = $waterMarkParams);
//end Watermark
I can't set position to lower left corner. How can i solve this problem? Thanks