Search code examples
opentbstinybutstrong

Trying to merge a picture into an OpenTBS template fails with "failed to found the picture" (sic)


Im using OpenTBS to merge data from PHP into a word template.

All the normal variables merge fine, however I fail to succeed at merging an image file.

The placeholder for my image in my Word file looks like this:

[onshow.logo;ope=changepic] 

When running the PHP script, I always get

TinyButStrong Error OpenTBS Plugin: Parameter ope=changepic used in the field [onshow.logo] has failed to found the picture. The process is ending, unless you set NoErr property to true.

I tried setting my php variable to the URL of the picture or to the absolute path of the picture on the server, both fail:

Is there anything obvious I am missing here?


Solution

  • By default OpenTBS expects the TBS field to be placed after the picture. You can tune this relative placement using parameter tagpos, so it can after, before or inside (in an image property).

    More details ate the documentation.