I’m trying to add a server side image uploaded from a user form to a Word document that gets generated using LiveDocx.
My word template looks like this.
«image:photo»
AKA
{ MERGEFIELD image:photo \* MERGEFORMAT }
My php looks like this.
$mailMerge = new Zend_Service_LiveDocx_MailMerge();
$mailMerge->uploadImage($this->logo_path);
$mailMerge->assign('image:photo', $this->logo_path);
I just get a blank area where the image should be. My other merge fields are working properly.
I didn’t realize that LiveDocx stores only the name of the file to be referenced. I found this out using:
The format came back like this:
So the template file was fine with this format:
AKA
But my php needed to look like this:
My full working code looks like this: