问题一:
字体取出来不对,实际字体为[Yu Gothic],取出来的字体为[Calibri]。
※改成 [Yu Gothic]之前的字体为[Calibri]。
请参考测试结果的Page1
问题二:
使用的默认的字体和Size时,取不到字体和Size,Size为NaN,字体为空。
※只有在新建幻灯片后,不改字体和Size的时候才会出现这个问题。改过字体和Size后,这个问题就不再现了。
请参考测试结果的Page2.
测试结果:
TestResult.PNG (1.9 KB)
测试文件:
Test.zip (30.3 KB)
测试代码:
var p = new Aspose.Slides.Presentation(@".\Test.pptx");
for (var i = 0; i < p.Slides.Count; i++)
{
var text = p.Slides[i].NotesSlideManager.NotesSlide?.NotesTextFrame;
var pf = text?.Paragraphs[0].Portions[0].PortionFormat;
if (pf == null)
{
continue;
}
Console.WriteLine("Note:" + text.Text);
Console.WriteLine("Size:" + pf.FontHeight);
Console.WriteLine("Font name:" + (pf.ComplexScriptFont ?? pf.EastAsianFont ?? pf.LatinFont ?? pf.SymbolFont)?.FontName);
Console.WriteLine();
}