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

Free Support Forum - aspose.com

Cannot access the font size in Master slide. IPortion.PortionFormat.FontHeight is Nan

Hi Support,


I would like to select the text of a master slide according to the size. The issue is that I can not access the size of the font for a Master slide as the value of IPortion.PortionFormat.FontHeight is Nan. I use the latest version of Aspose.Slides: 14.3.0

Sample code:

var ppt = new Presentation(“Slides.ppt”);
var master1 = ppt.Masters[0];
var textBoxes=Aspose.Slides.Util.SlideUtil.GetAllTextBoxes(master1);
var firstPortion = textBoxes[0].Paragraphs[0].Portions[0];

Trace.WriteLine("PPT Portion Height: " + firstPortion.PortionFormat.FontHeight);

var pptx = new Presentation(pptxFile);
var master1x = pptx.Masters[0];
var textBoxesPptx = Aspose.Slides.Util.SlideUtil.GetAllTextBoxes(master1x);
var firstPortionPptx = textBoxesPptx[0].Paragraphs[0].Portions[0];

Trace.WriteLine("PPTX Portion Height: " + firstPortionPptx.PortionFormat.FontHeight);


Output:

PPT Portion Height: NaN
PPTX Portion Height: NaN


Please find attached Slides.ppt and Slides.pptx the files used for my tests.

Thank you,
Lea

Hi Lea,


I have worked with the presentation files shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-35399 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,