powerpointopentbstinybutstrong

OpenTBS / Powerpoint / PHP - Center picture changed in slide


i'm changing dinamycally a picture in my presentation using OpenTBS, however the new picture can have a different size of my original picture, so the new picture it's not centered. Can I center de picture center in the slide?

My code to change the picture is this:

    $TBS->PlugIn(OPENTBS_CHANGE_PICTURE, 'picture_original', 'new_picture.png');

I need to center the picture in the slide. Is this possible?

Thanks


Solution

  • Unlike a DOCX, in a PPTX it seems impossible to position a picture relatively to the center of the slide. And a picture can be inserted only in the slide or in a Smart Art, not in a text box or a table. The Position property of a picture seems to accept the Center option, but in fact the position is converted to absolute in the back-end. You can see that when you reopen the presentation.

    So OpenTBS will not be able to move the picture by itself in order to have it centered.

    Maybe the solution is to make all the pictures with the same size, having a transparent background and the previous images with their original size in the middle.