Closed rajatkhare619 closed 4 years ago
@rajatkhare619: The x and y coordinates are in pixels. Unfortunately, there's no programmatic way of getting the x/y pixel coords of objects that come from an externally loaded pptx file. You can however calculate it manually - when viewing the properties of any widget in PowerPoint, take the left/top position values in inches, and simply multiply by 72 to get pixels. For example, a widget at:
Left: 1.5" Top: 2"
Will be the following in pixels:
X = 1.5 72 = 108px Y = 2 72 = 144px
Hope this helps!
Thanks @gregdolley!, I'll try that.
I'm trying to figure out how to position the text using the x and y values
Is there a way by which I can know exactly what values to pass for x and y? For example, by opening an existing ppt and getting the position of a similar element and then passing those values in the function. Or do I have to do this by trial and error?