Replies: 7   Views: 803
Add pagination and contents to the footers replacing them in an existing docx
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Diplodoc071  · 23-12-2021 - 13:40

The task is as follows:
Add a new page with html to an existing document.
Add pagination and text with an image (html) to the footers.

For some documents this works, for some it does not (footer only in last page).
Please tell me what is the reason and how to solve it.

Additionally required:
Transform to pdf, add background image.

My code:

$phpdocx=new CreateDocxFromTemplate(ROOT_DIR.UPLOAD_DOCUMENTS_DIR.$document_source);
$numbering=new WordFragment($phpdocx,'defaultFooter');
$pdf_util=new PdfUtilities();