Forum


Replies: 2   Views: 2893
Replacing template images failes when textboxes are included in document
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 mquadrat  · 14-09-2011 - 11:49

The replacement of images in templates does not work in more complex templates than the ones inlcuded in the examples. In the code you assume that there are as many docPr tags as there are blib tags. This is not true. Textboxes for example also generate docPr tags but no blib tags. The count of the two node lists is different causing an exception in the replaceImages method.

You might want to try your template code with some more real world examples to see, if there are more issues like this one..

Posted by admin  · 11-04-2013 - 12:13

Hello,

You can use MHT methods to replace a text variable with an image (and html, and other contents).

Regards.