Incorrect font height for text in notes slide

Hi,


When I try to get the font size of the Notes Pages in the attached presentation, I get 18 instead of 10.

Here’s the code I used:
<span style=“font-family: “Courier New”;”>
String path = “Test.pptx”;

InputStream inputStream = new FileInputStream(path);

Presentation presentation = new Presentation(inputStream);

inputStream.close();

INotesSlide notesPage = presentation.getSlides().get_Item(0).getNotesSlideManager().getNotesSlide();

IShapeCollection shapes = notesPage.getShapes();

IAutoShape shape = (IAutoShape) shapes.get_Item(3);

IParagraphCollection paragraphs = shape.getTextFrame().getParagraphs();

IParagraph paragraph = paragraphs.get_Item(0);

IPortion portion = paragraph.getPortions().get_Item(0);

System.out.println(portion.getText());

IPortionFormatEffectiveData effectiveData = portion.createPortionFormatEffective();

System.out.println(effectiveData.getFontHeight());

paragraph = paragraphs.get_Item(1);

portion = paragraph.getPortions().get_Item(0);

System.out.println(portion.getText());

effectiveData = portion.createPortionFormatEffective();

System.out.println(effectiveData.getFontHeight());
paragraph = paragraphs.get_Item(2);

portion = paragraph.getPortions().get_Item(0);

System.out.println(portion.getText());

effectiveData = portion.createPortionFormatEffective();

System.out.println(effectiveData.getFontHeight());
paragraph = paragraphs.get_Item(5);

portion = paragraph.getPortions().get_Item(0);

System.out.println(portion.getText());

effectiveData = portion.createPortionFormatEffective();

System.out.println(effectiveData.getFontHeight());
paragraph = paragraphs.get_Item(6);

portion = paragraph.getPortions().get_Item(0);

System.out.println(portion.getText());

effectiveData = portion.createPortionFormatEffective();

System.out.println(effectiveData.getFontHeight());

Here’s the output:

<span style=“font-family: “Courier New”;”>Notes-Audio:
<span style=“font-family: “Courier New”;”>18.0
<span style=“font-family: “Courier New”;”>BC Oil Miracle captures the benefits of precious botanical oils without overburdening thanks to its unique evaporating formula.
<span style=“font-family: “Courier New”;”>18.0
<span style=“font-family: “Courier New”;”>This care routine instantly nourishes hair with the essence of hair beauty: opulent shine and caress able softness.
<span style=“font-family: “Courier New”;”>18.0
<span style=“font-family: “Courier New”;”>Tip-Audio:
<span style=“font-family: “Courier New”;”>18.0
<span style=“font-family: “Courier New”;”>The Oil Miracle assortment fulfils the needs of all hair types
18.0

Can you check this?

Thanks,
Zeljko

Hi Zeljko,

I have worked with presentation file shared by you using Aspose.Slides for JAVA 17.3.0 and have been able to observe the issue. A ticket with ID SLIDESJAVA-36211 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-36211) have been fixed in this update.

@Zeljko,
Please use the following code snippet:

Presentation pres = new Presentation("Test22.pptx");
INotesSlide notesPage = pres.getSlides().get_Item(0).getNotesSlideManager().getNotesSlide();

IAutoShape shape = (IAutoShape)notesPage.getShapes().get_Item(3);
IParagraphCollection paragraphs = shape.getTextFrame().getParagraphs();

IPortionFormatEffectiveData portionFormat = paragraphs.get_Item(0).getPortions().get_Item(0).getPortionFormat().getEffective();
System.out.println(paragraphs.get_Item(0).getText());
System.out.println(portionFormat.getFontHeight());

portionFormat = paragraphs.get_Item(1).getPortions().get_Item(0).getPortionFormat().getEffective();
System.out.println(paragraphs.get_Item(1).getText());
System.out.println(portionFormat.getFontHeight());

portionFormat = paragraphs.get_Item(2).getPortions().get_Item(0).getPortionFormat().getEffective();
System.out.println(paragraphs.get_Item(2).getText());
System.out.println(portionFormat.getFontHeight());

portionFormat = paragraphs.get_Item(5).getPortions().get_Item(0).getPortionFormat().getEffective();
System.out.println(paragraphs.get_Item(5).getText());
System.out.println(portionFormat.getFontHeight());

portionFormat = paragraphs.get_Item(6).getPortions().get_Item(0).getPortionFormat().getEffective();
System.out.println(paragraphs.get_Item(6).getText());
System.out.println(portionFormat.getFontHeight());

Output:

Notes-Audio:
10.0
BC Oil Miracle captures the benefits of precious botanical oils without overburdening thanks to its unique evaporating formula.
10.0
This care routine instantly nourishes hair with the essence of hair beauty: opulent shine and caress able softness.
10.0
Tip-Audio:
10.0
The Oil Miracle assortment fulfils the needs of all hair types.
10.0