We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Is there anyway to grow textbox based on text horizontally?

I am using .net latest version and I create a textbox and put more text in it that can fit. I see there is:


textFrame.TextFrameFormat.AutofitType = TextAutofitType.Normal;

which allows you to decide if you want to shrink the font to fit the textbox or grow the textbox to fix the text. I wanted to see if in the “grow” case, i can specify that i want to grow the textbox horionzally until all of the text fits (and make the vertical space of teh textbox fixed)

Is this possible with aspose.slides?

I see this option does exist for powerpoint 2013+ and you can see the description for Resize Shape to fix text option on this page here but its unclear to me how in aspose.slides i can tell it to just grow horizontally


Hi Adam,


Thank you for your interest in Aspose.Slides.

I have observed your comments and like to share with you that, I have figured out that you are looking for Resizing the shape as in PowerPoint. You may use AutofitType.Shape property, which is equivalent to “Resize shape to fit text” option in PowerPoint. It works in Aspose.Slides exactly the way it works in the PowerPoint. This is how you can specify the grow case.

I hope this will be helpful. Please share if I may help you further in this regard.

Best Regards,