We’ve spotted an issue where the wrong font size and name is returned when looking at speaker note text in the pptx version of a document. Instead of getting 12pt Calibri (which is reported in the .ppt version and by PowerPoint for both versions) we get 18pt Arial returned.
Here is the sample code to show the issue (docs attached)
Presentation ppt = new Presentation(@“Presentation2.ppt”);
PresentationEx pptx = new PresentationEx(@“Presentation2.pptx”);
Portion pptPortion = (ppt.Slides[0].Notes.Shapes[1] as Rectangle).TextFrame.Paragraphs[0].Portions[0];
PortionEx pptxPortion = (pptx.Slides[0].NotesSlide.Shapes[1] as AutoShapeEx).TextFrame.Paragraphs[0].Portions[0];
string pptText = pptPortion.Text;
string pptFontName = ppt.Fonts[pptPortion.FontIndex].FontName;
int pptFontSize = pptPortion.FontHeight;
string pptxText = pptxPortion.Text;
string pptxFontName = pptxPortion.CreatePortionFormatData().LatinFont.FontName;
int pptxFontSize = (int)pptxPortion.CreatePortionFormatData().FontHeight;
Console.WriteLine(“Text equals: {0}”, pptText.Equals(pptxText));
Console.WriteLine(“FontName equals: {0}”, pptFontName.Equals(pptxFontName));
Console.WriteLine(“FontSize equals: {0}”, pptFontSize == pptxFontSize);
Any information to help resolve this would be appreciated.
cheers,
Robin
Hi Robin,