Forum


Replies: 3   Views: 3515
Removing placeholder 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 fileprint  · 31-07-2016 - 08:44

Deleted by fileprint · 03-08-2016 - 08:27

Posted by admin  · 31-07-2016 - 18:32

Hello,

UPDATE: Remove an image that contains a placeholder

We recommend you to use the method removeWordContent from DOCXPATH:

http://www.phpdocx.com/documentation/introduction/docxpath

http://www.phpdocx.com/api-documentation/docx-path/remove-elements-in-docx

Besides this page docs, please check the included examples in the package.

This method allows to remove any Word content, so it allows to do exactly what you need.

Regards.

 

Posted by fileprint  · 01-08-2016 - 05:46

Deleted by fileprint · 03-08-2016 - 08:27

Posted by admin  · 01-08-2016 - 07:14

Hello,

The method removeTemplateVariable only works for text variables because it looks for w:t tags, and image placeholders don't use this tag.

The DOCXPath suggested solution works fine. We recommend you to open a support ticket (http://www.phpdocx.com/support) and one of the members of the dev team will create a custom script for your template. In the support ticket, please attach the template you are using and they'll create the script using it.

If you don't want to get support tickets, you can send the template to contact[at]phpdocx.com but the script will take longer.

Regards.