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

Free Support Forum - aspose.com

Extracting wrong formatting in notes (1243) using Aspose.Slides for Java

Hi Im sending you two presentations files.zip (1.7 MB)
They both have issues with notes, i get wrong formatting as you can see below.

file1:

Presentation presentation = new Presentation("TB1000_Unit_06-4.pptx");

    ISlideCollection slides = presentation.getSlides();
    ISlide slide = slides.get_Item(0);
    INotesSlide noteSlide = slide.getNotesSlideManager().getNotesSlide();
    AutoShape shape = (AutoShape) noteSlide.getShapes().get_Item(1);
    IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(0);
    IPortion portion = paragraph.getPortions().get_Item(0);
    IPortionFormatEffectiveData fontFormatEfective = portion.createPortionFormatEffective();

    assertFalse(fontFormatEfective.getFontBold());
    assertEquals("Times New Roman", fontFormatEfective.getLatinFont().getFontName()); /
    assertEquals(11.0, fontFormatEfective.getFontHeight(), 0.0);
  	  
    slide = slides.get_Item(7);
    noteSlide = slide.getNotesSlideManager().getNotesSlide();
    shape = (AutoShape) noteSlide.getShapes().get_Item(1);
    paragraph = shape.getTextFrame().getParagraphs().get_Item(0);
    portion = paragraph.getPortions().get_Item(0);
    fontFormatEfective = portion.createPortionFormatEffective();
    assertFalse(fontFormatEfective.getFontBold());
    assertEquals("Times New Roman", fontFormatEfective.getLatinFont().getFontName()); 
    assertEquals(11.0, fontFormatEfective.getFontHeight(), 0.0);

file2:

    Presentation presentation = new Presentation("presentation2.pptx");
    ISlide slide = presentation.getSlides().get_Item(3);
    INotesSlide noteSlide = slide.getNotesSlideManager().getNotesSlide();
    AutoShape shape = (AutoShape) noteSlide.getShapes().get_Item(2);
    IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(0);
    IPortion portion = paragraph.getPortions().get_Item(0);
    IPortionFormatEffectiveData fontFormatEfective = portion.createPortionFormatEffective();

    assertFalse(fontFormatEfective.getFontBold());
    assertEquals("Times New Roman", fontFormatEfective.getLatinFont().getFontName());
    assertEquals(12.0, fontFormatEfective.getFontHeight(), 0.0);


    slide = presentation.getSlides().get_Item(4);
    noteSlide = slide.getNotesSlideManager().getNotesSlide();
    shape = (AutoShape) noteSlide.getShapes().get_Item(2);
    paragraph = shape.getTextFrame().getParagraphs().get_Item(0);
    portion = paragraph.getPortions().get_Item(0);
    fontFormatEfective = portion.createPortionFormatEffective();
    assertFalse(fontFormatEfective.getFontBold());
    assertEquals("Times New Roman", fontFormatEfective.getLatinFont().getFontName());
    assertEquals(12.0, fontFormatEfective.getFontHeight(), 0.0);

All assertions are wrong, also this happens on all the slides that have notes.
Can you please check this out?
Thanks,

Zeljko.

@Zeljko,

I have worked with the presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESJAVA-36944 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 fixed.

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