Forum


Replies: 6   Views: 4055
Getting image captions to work?
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 nicks  · 20-01-2016 - 12:08

Thanks for the example, however I am not having much luck making it work:

$captionsettings = array('show_label' => true, 'text' => 'FIRST IMAGE');

$image->addImage(array('src' => $imagesrc,'imageAlign' => 'center','height' => $picvar[0],'width' => $picvar[1],'caption' => $captionsettings));

 

I get this error:

Fatal error: Call to a member function saveXML() on a non-object in /var/www/phpdocx_corporate-new2/classes/CreateDocx.inc on line 3376

 

Am I missing any other parameters?