($width) AND $width .= 'px'; $style = " style=\"width: $width\""; } $value = $value ? $value : date('H:i'); $s = ""; return $s; } // form_date('start', '2018-07-05') 为空则当前日期 function form_date($name, $value = 0, $width = FALSE) { $style = ''; if (FALSE !== $width) { is_numeric($width) AND $width .= 'px'; $style = " style=\"width: $width\""; } $value = $value ? $value : date('Y-m-d'); $s = ""; return $s; } /**用法 * * echo form_radio_yes_no('radio1', 0); * echo form_checkbox('aaa', array('无', '有'), 0); * * echo form_radio_yes_no('aaa', 0); * echo form_radio('aaa', array('无', '有'), 0); * echo form_radio('aaa', array('a'=>'aaa', 'b'=>'bbb', 'c'=>'ccc', ), 'b'); * * echo form_select('aaa', array('a'=>'aaa', 'b'=>'bbb', 'c'=>'ccc', ), 'a'); */ ?>OpenTBSPowerpointPHP - Center picture changed in slide - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

OpenTBSPowerpointPHP - Center picture changed in slide - Stack Overflow

programmeradmin3浏览0评论

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

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

Share Improve this question asked Jan 29 at 21:11 user1600801user1600801 3117 silver badges26 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

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.

发布评论