Working with - Aspose.Slides Python library.
When I try to resize shape to fit text using the [TextFrameFormat.AutoFitType Property] on a text box then the height of the output text box is not wrapped properly.
Example:
When I try to use this code snippet on a pptx file, then the output appears as visible in attached in screenshot(shape_fit_via_aspose file)
with slides.Presentation("input.pptx") as presentation:
presentation.slides[0].shapes[0].text_frame.text_frame_format.wrap_text = slides.NullableBool(True)
presentation.slides[0].shapes[0].text_frame.text_frame_format.autofit_type = slides.TextAutofitType.SHAPE
presentation.save("output.pptx", slides.export.SaveFormat.PPTX)
However, when we try to use the powerpoint application to apply the same “Resize shape to fit text” setting on the text box, then the output appears as visible in screenshot(shape_fit_via_powerpoint file).
@Prezent_Inc,
Thank you for the presentation file. With Aspose.Slides for Python 24.6, I was unable to reproduce the problem you described. My result: output.zip (27.7 KB). Unfortunately, we need more information on how to reproduce the problem on our end.
Please also note that the wrap_text property should be used like this:
@Prezent_Inc,
I tested the problem and got the same results. Please also note that the “input.pptx” file you provided and the file you provided above are identical.