DominikPalo's avatar
DominikPalo
Iron Contributor
Oct 13, 2022
Status:
New

PowerPoint JS API: Add support for getting dimensions of slides

Currently, only the shape class has the width and height properties. It would be really beneficial for us to have the same properties also for the slide class.

 

Use case:

We need to insert content add-ins covering the entire slide. As content add-in allows us to specify only fixed dimensions in the manifest (RequestedWidth and RequestedHeight), our idea is to automatically resize newly inserted content add-ins to the dimensions of the parent slide. e.g.:

 

contentAddinShape.left = 0;
contentAddinShape.top = 0;
contentAddinShape.width = parentSlide.width;
contentAddinShape.height = parentSlide.height;

 


Alternative solution:
Allow setting RequestedWidth and RequestedHeight in relative units, so we could use something like:

 

<DefaultSettings>
  <RequestedWidth>100%</RequestedWidth>
  <RequestedHeight>100%</RequestedHeight>
</DefaultSettings>

 

No CommentsBe the first to comment