Forum


Replies: 2   Views: 465
How to add new page and insert image
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 rabol  · 13-07-2023 - 07:15

Hi

Based on a template I need to add one or more images.

Each image should be added on a bank page at the end of the template.

I tried to search for addPage,insertPage etc. but could not find anything

some psedo code

 

 

// Load the template
$docx = new CreateDocxFromTemplate($userDoc->getFullPathToTemplate());

// this is what i want
$docx->addNewPageAtTheENd();

$docx->insertImage('/path/to/my/image.png');