0

It seems to me that officeJS powerpoint API is quite limited. Is there a way to get properties of a slide? For example, getting the height and width of a slide?

I have tried

 let parentSlide = shape.getParentSlide().load()
 await context.sync()
 console.log(parentSlide)

but I also can't even see the results from console.log

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • try `console.log(JSON.stringify(parentSlide))`. Also, you can find the properties of the slide object by reading the reference documentation: https://learn.microsoft.com/javascript/api/powerpoint/powerpoint.slide – Rick Kirkham Jan 13 '23 at 20:17
  • Finally, note that a slide has a fixed aspect ratio; e.g., 16:9 or 4:3; but it does not have a fixed height or width. The size of the slide you see in editing mode, varies with the size of the PowerPoint window and the size of the other panes in PowerPoint. The size automatically changes as these other sizes change. – Rick Kirkham Jan 13 '23 at 20:29

0 Answers0