Autosizing font in SmartArt

Hi,

I’m testing the ‘smartart creation’ functionality which is working nicely. I’m exporting an org chart exhibit using the exact method in your docs here (Manage SmartArt Shape Node|Aspose.Slides Documentation). Quick questions if I may:

a) If exporting a fairly large number of nodes, the font stays large and you can only see 1-2 chars in each orgchart box. How would I turn on ‘font autosize’ so it scales appropriately?

b) The example makes the exhibit 400, 400 in size. Is there a recommended way to ensure it’s always the full size of the slide (regardless of the slide size it is dealing with?)

Many thanks.

Hi Mark,

Thanks for inquiring Aspose.Slides.

I have observed the requirements shared by you and like to share that you can use AutofitType property to fit the text inside the shape. The following sample code will be helpful in this regard.

newNode.TextFrame.TextFrameFormat.AutofitType = TextAutofitType.Shape;


Secondly, there is no recommendation or standard size setting for SmartArt shape like we have used 400 x 400 in example. You can use any size that is appropriate as per your requirements.

Many Thanks,

Thanks for that, perfect.