Forum


Replies: 4   Views: 3416
Replace image on cover page
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 Squad internet  · 25-02-2014 - 07:04

Hi guys,



I'm trying to replace an image that resides on the cover page. I have (more or less) the following code.



$this->_document=new createDocx($pathToMyTemplate, $pathToSpecificTempDir);

......

$this->_document->addTemplateImage('_MYIMAGE_', $imagePath);



Now I get the following error:



Warning: DOMDocument::loadXML(): Empty string supplied as input in /var/www/Core/0.1/Includes/phpdocx/classes/CreateTemplate.inc on line 1149



It looks like that self::$_document is not set.

Now in the examples you use a different call to add a template file, but that call makes it impossible to target a specific tmp dir, something that is important in this case.



 



Any hints?