I am using the Python library python-pptx to generate some powerpoint and in some case - the text that is being generating is outside the slide ( because there are two many bullet or the text is too big ).
For example :
+------------------------------------------+
| Title of the slide |
+-------+-----------------------+----------|
| o - First Bullet |
| o - Second bullet |
| o - Third bullet |
+------------------------------------------+ <-- End of slide
o - Fourth bullet <- Out of slide
o - Fifth bullet <- Out of slide
So I was wondering if there any utility to detect that the text is getting out of the place holder or out of the slide ?
Thanks in advance,
Florian
If the python-pptx library has a way of accessing the BoundTop and BoundHeight properties of the text box, you can use that:
A VBA example you can test within PPT to get an idea how it works; be sure to select a text box before running it:
You'll likely notice some slight variances with this; if you need to be more precise, you'll want to take the TextFrame's .MarginTop and .MarginBottom into account as well.
Test .BoundTop + .BoundHeight against ActivePresentation.PageSetup.SlideHeight to determine whether the text is off the bottom of the slide or not.